背景
狗博主一直喜欢用CentOS 6(就像很多人不习惯其他操作平台一样),最近又剁了几个OVZ小鸡,想着给他装GOOGLE BBR的时候,却发现glibc还停留在2.13,这里我知道的有两种更新方式,推荐使用第一种,会比较快。
OpenVZ 更新glibc到2.15
方法一:rpm安装
先下载以下几个文件:
wget http://ftp.redsleeve.org/pub/steam/glibc-2.15-60.el6.x86_64.rpm \
http://ftp.redsleeve.org/pub/steam/glibc-common-2.15-60.el6.x86_64.rpm \
http://ftp.redsleeve.org/pub/steam/glibc-devel-2.15-60.el6.x86_64.rpm \
http://ftp.redsleeve.org/pub/steam/glibc-headers-2.15-60.el6.x86_64.rpm \
http://ftp.redsleeve.org/pub/steam/nscd-2.15-60.el6.x86_64.rpm
然后安装
rpm -Uvh glibc-2.15-60.el6.x86_64.rpm \
glibc-common-2.15-60.el6.x86_64.rpm \
glibc-devel-2.15-60.el6.x86_64.rpm \
glibc-headers-2.15-60.el6.x86_64.rpm \
nscd-2.15-60.el6.x86_64.rpm
方法二:编译安装(上面的方式行不通,再用编译的方式,编译的方式相对时长会久很多)
wget http://ftp.gnu.org/gnu/glibc/glibc-2.15.tar.gz
wget http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz
tar -zxf glibc-2.15.tar.gz
tar -zxf glibc-ports-2.15.tar.gz
mv glibc-ports-2.15 glibc-2.15/ports
mkdir glibc-build-2.15
cd glibc-build-2.15
../glibc-2.15/configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
make all && make install
检查是否成功安装
ldd --version
成功安装的输入如下
Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.
成功安装完成后就可以愉快的安装bbr了,可以参考我这里的一键bbr脚本:
https://www.sabia.cc/bash-openvz-bbr-lkl-nanqinlang.html
本文转载自扩软博客
https://blog.kuoruan.com/
© 著作权归作者所有
文章评论(8)
救活了我的vps
@yunnan0317 能帮到你简直太好了!
请问当我更新glbic输入
rpm -Uvh glibc-2.15-60.el6.x86_64.rpm \
glibc-common-2.15-60.el6.x86_64.rpm \
glibc-devel-2.15-60.el6.x86_64.rpm \
glibc-headers-2.15-60.el6.x86_64.rpm \
nscd-2.15-60.el6.x86_64.rpm
之后,系统提示:
# rpm -Uvh glibc-2.15-60.el6.x86_64.rpm glibc-common-2.15-60.el6.x86_64.rpm glibc-devel-2.15-60.el6.x86_64.rpm glibc-headers-2.15-60.el6.x86_64.rpm nscd-2.15-60.el6.x86_64.rpm
error: Failed dependencies:
kernel-headers is needed by glibc-headers-2.15-60.el6.x86_64
kernel-headers >= 2.2.1 is needed by glibc-headers-2.15-60.el6.x86_64
glibc-common = 2.12-1.149.el6_6.4 is needed by (installed) glibc-2.12-1.149.el6_6.4.i686
Exit code: 5
*** End of transmission ***
安装失败了
@wayne 用另一个方式安装即可。
请注明出处:扩软博客,药店碧莲谢谢
@Melon 大佬实在抱歉,可能因为更新主题后,转载标签不见导致,已添加,请见谅。
用方法一时出现以下问题:
rpm -Uvh glibc-2.15-60.el6.x86_64.rpm
error: Failed dependencies:
glibc-common = 2.15-60.el6 is needed by glibc-2.15-60.el6.x86_64
用方法二时出现以下问题:
[root /glibc-build-2.15]# ../glibc-2.15/configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/glibc-build-2.15':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details
wget 第二步的时候
STDERR: TOO MUCH DATA RECEIVED