Update glibc library version to 2.14 in CentOS6
1、check glibc library in system.
strings /lib64/libc.so.6 |grep GLIBC_
So, we can see the newest version of glibc is 2.1.2, we need to upgrade glibc to 2.14.
2、download and install glibc-2.14
wget http://ftp.gnu.org/gnu/glibc/glibc-2.14.tar.gz
tar -xzvf glibc-2.14.tar.gz
cd glibc-2.14
mkdir build
cd build
../configure –prefix=/opt/glibc-2.14
make && make install
compiling and installing will take a long time.
3、create symbol link.
1、remove old symbol.
rm -rf /lib64/libc.so.6
2、rescue
LD_PRELOAD=/opt/glibc-2.14/lib/libc-2.14.so ln -s /opt/glibc-2.14/lib/libc-2.14.so /lib64/libc.so.6
becaue we can’t excute any command after the old symbol had been deleted,we must excute
the upper command carefully.
3、create new symbol link.
ln -s /opt/glibc-2.14/lib/libc-2.14.so /lib64/libc.so.6
4、check current glibc version.
side-effect and solution:
There is system time abnormal after updating glibc-2.12 to glibc-2.14.
the following.
Fri Feb 10 06:52:02 Local time zone must be set--see zic manual page 2019 Reason and solution: GNU had stressed about TZ environment value. If there is no TZ value. system will chose defalut timezone,the specify address depends on library libc.so.6. the default timezone file path in centos is /etc/localtime before updating. But when we comire the new library, set --prefix=/usr/local/glibc-2.14,this will lead to the default path changed to /usr/local/glibc-2.14/etc/localtime,So system can not find the defalut timezone file path. ln -sf /etc/localtime /usr/local/glibc-2.14/etc/localtime reference url: https://segmentfault.com/q/1010000008312223