查看系统glibc版本,strings /lib64/libc.so.6 | grep -i glibc或者ldd --version或者rpm -qa | grep glibc
直接在系统更新glibc是不安全的,但是可以alternative并行安装(安装到非系统目录,一般使用/opt),这样可以在不破坏系统的情况下,通过修改ld路径使得应用程序可用;
(cannot update glibc on Centos 6 safely. However you can install 2.14 alongside 2.12 easily, then use it to compile projects etc.
Common alternative technique. Installing GLIBC 2.14 in parallel (Intall it to the /opt directory) Then it is available to the programs which require it without breaking your core OS)
mkdir ~/glibc_install && cd ~/glibc_install
wget http://ftp.gnu.org/gnu/glibc/glibc-2.14.tar.gz
tar zxvf glibc-2.14.tar.gz
cd glibc-2.14
mkdir build
cd build
sudo ../configure --prefix=/opt/glibc-2.14
sudo make -j4
sudo make install
export LD_LIBRARY_PATH=/opt/glibc-2.14/lib