Centos – How to update glibc to 2.14 in CentOS 6.5

centosglibcupgrade

I want to install Android NDK on my CentOS 6.5 machine. But when I ran the program, it says it needs glibc 2.14 to be able to run. My CentOS 6.5 only has Glibc 2.12 installed. So I tried to update glibc by:

$ sudo yum update glibc

But after that I found the glibc version is still 2.12, not 2.14.

$ ldd --version
ldd (GNU libc) 2.12

I think glibc 2.14 may not be available on CentOS repositories. So how can I update it to glibc 2.14 on CentOS 6.5?

Best Answer

You cannot update glibc on Centos 6 safely. However you can install 2.14 alongside 2.12 easily, then use it to compile projects etc. Here is how:

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

../configure --prefix=/opt/glibc-2.14

make -j4

sudo make install

export LD_LIBRARY_PATH="/opt/glibc-2.14/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
Related Question