Cent OS 6.8 升级glibc 2.12->2.17
1、首先安装必要的库:
gcc
2、查看现有glibc版本:
#ldd --version
ldd (GNU libc) 2.12
Copyright (C) 2010 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.
---------------------
3、查看现有系统包中能安装的glibc版本:
# strings /lib64/libc.so.6 |grep GLIBC_
GLIBC_2.2.5
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
---------------------
可见,Centos6能够支持的最高版本也就是2.12了,所以,必须要到官网下载2.17版本手动进行安装了。
4、安装Glibc2.17:
# wget https://ftp.gnu.org/gnu/glibc/glibc-2.17.tar.gz
# tar –zxvf glibc-2.17.tar.gz
# cd glibc-2.17
# mkdir build
# cd build
# ../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
# make
# make install
5、查看安装后的glibc版本:
# ldd --version
ldd (GNU libc) 2.17
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.
---------------------
PS:建议在升级glibc之前,务必要备份好重要数据。