CentOS 6.x 如何升级 glibc 2.17

CentOS 6.x 如何升级 glibc 2.17

ldd --version
rpm -qa | grep glibc

#查看glibc的版本
strings /lib64/libc.so.6 |grep GLIBC_

sudo yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7

update glibc to 2.17 for CentOS 6

# update glibc to 2.17 for CentOS 6
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
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14

update glibc to 2.15 for CentOS 6


# update glibc to 2.15 for CentOS 6
wget -c http://ftp.redsleeve.org/pub/steam/glibc-utils-2.15-60.el6.x86_64.rpm &
wget -c http://ftp.redsleeve.org/pub/steam/glibc-headers-2.15-60.el6.x86_64.rpm &
wget -c http://ftp.redsleeve.org/pub/steam/glibc-static-2.15-60.el6.x86_64.rpm &
wget -c http://ftp.redsleeve.org/pub/steam/glibc-common-2.15-60.el6.x86_64.rpm &
wget -c http://ftp.redsleeve.org/pub/steam/glibc-2.15-60.el6.x86_64.rpm &
wget -c http://ftp.redsleeve.org/pub/steam/glibc-common-2.15-60.el6.i686.rpm &
wget -c http://ftp.redsleeve.org/pub/steam/glibc-devel-2.15-60.el6.x86_64.rpm &
wget -c http://ftp.redsleeve.org/pub/steam/nscd-2.15-60.el6.x86_64.rpm &

sudo rpm -e --nodeps --justdb glibc-2.*.i686 --allmatches
rpm -Uvh *-2.15-60.el6.x86_64.rpm
rpm -Uvh glibc-2.15-60.el6.i686.rpm
ldconfig

# -e, --erase                       erase (uninstall) package
# -U, --upgrade=<packagefile>+      upgrade package(s)
# -v, --verbose                     provide more detailed output
# -h, --hash                        print hash marks as package installs (good with -v)
# --nodeps                          忽略软件包的依赖关系强行安装
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22

源码安装

wget https://mirrors.tuna.tsinghua.edu.cn/gnu/glibc/glibc-2.17.tar.gz
tar -zxvf glibc-2.17.tar.gz
cd glibc-2.17
mkdir build && cd $_
sudo ../configure --prefix=/usr/glibc-2.17 --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin  
make && make install
posted @ 2018-04-09 23:19  丁培飞  阅读(4910)  评论(0编辑  收藏  举报