glibc
glibc是GNU发布的libc库,即c运行库。glibc是linux系统中最底层的api,几乎其它任何运行库都会依赖于glibc;
它本身也提供了许多其它一些必要功能服务的实现;
libc.so.6
libc.so.6是一个链接到glibc的软链接;
对glibc的升级其实是对libc.so.6这个库的更改;
libc.so.6删除之后会导致系统很多命令的失效,所以对libc.so.6的更改要小心小心再小心,很容易将系统搞崩溃;
查看libc.so.6的版本
需要知道libc.so.6这个库在哪个位置,一般是/lib、/lib64、/usr/lib、/usr/lib64这四个文件夹下
用strings命令查看版本号;
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
[root@localhost /]# find / -iname libc.so.6 /lib/libc.so.6 /lib/i686/nosegneg/libc.so.6 [root@localhost /]# strings /lib/libc.so.6 | grep GLIBC_ GLIBC_2.0 GLIBC_2.1 GLIBC_2.1.1 GLIBC_2.1.2 GLIBC_2.1.3 GLIBC_2.2 GLIBC_2.2.1 GLIBC_2.2.2 GLIBC_2.2.3 GLIBC_2.2.4 GLIBC_2.2.6 GLIBC_2.3 GLIBC_2.3.2 GLIBC_2.3.3 GLIBC_2.3.4 GLIBC_2.4 GLIBC_2.5 GLIBC_2.6 GLIBC_2.7 GLIBC_2.8 GLIBC_2.9 GLIBC_2.10 GLIBC_2.11 GLIBC_2.12 GLIBC_PRIVATE |
升级libc.so.6
两种方法升级,一种是通过rpm包升级,另外一种是通过编译glibc,然后将生成的库链接到libc.so.6上。
通过rpm包对Centos6.x的32位系统的升级:
1 2 3 4 5 6 7 8 9 |
wget https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-i386/glibc-2.17-55.fc20/glibc-2.17-55.el6.i686.rpm wget https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-i386/glibc-2.17-55.fc20/glibc-common-2.17-55.el6.i686.rpm wget https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-i386/glibc-2.17-55.fc20/glibc-devel-2.17-55.el6.i686.rpm wget https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-i386/glibc-2.17-55.fc20/glibc-headers-2.17-55.el6.i686.rpm wget https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-i386/glibc-2.17-55.fc20/glibc-utils-2.17-55.el6.i686.rpm wget https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-i386/glibc-2.17-55.fc20/glibc-static-2.17-55.el6.i686.rpm wget https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-i386/glibc-2.17-55.fc20/nscd-2.17-55.el6.i686.rpm sudo rpm -Uvh *-2.17-55.el6.i686.rpm |
通过rpm包对Centos6.x的64位系统的升级:
1 2 3 4 5 6 7 8 9 10 11 12 |
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-utils-2.17-55.el6.x86_64.rpm & wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-static-2.17-55.el6.x86_64.rpm & wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-2.17-55.el6.x86_64.rpm & wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-common-2.17-55.el6.x86_64.rpm & wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-devel-2.17-55.el6.x86_64.rpm & wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-headers-2.17-55.el6.x86_64.rpm & wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/nscd-2.17-55.el6.x86_64.rpm & sudo rpm -e --nodeps --justdb glibc-2.*.i686 --allmatches sudo rpm -Uvh *-2.17-55.el6.x86_64.rpm #或者: sudo rpm -Uvh *-2.17-55.el6.x86_64.rpm --force --nodeps |
安装包下载地址:
https://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-i386/glibc-2.17-55.fc20/