Multiple glibc libraries on a single host
My linux (SLES-8) server currently has glibc-2.2.5-235, but I have a program which won\'t work on this version and requires
@msb gives a safe solution.
I met this problem when I did import tensorflow as tf
in conda environment in CentOS 6.5
which only has glibc-2.12
.
ImportError: /lib64/libc.so.6: version `GLIBC_2.16' not found (required by /home/
I want to supply some details:
First install glibc
to your home directory:
mkdir ~/glibc-install; cd ~/glibc-install
wget http://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=/home/myself/opt/glibc-2.17 # <-- where you install new glibc
make -j # You can find your by using **nproc** command
make install
Second, follow the same way to install patchelf;
Third, patch your Python:
[myself@nfkd ~]$ patchelf --set-interpreter /home/myself/opt/glibc-2.17/lib/ld-linux-x86-64.so.2 --set-rpath /home/myself/opt/glibc-2.17/lib/ /home/myself/miniconda3/envs/tensorflow/bin/python
as mentioned by @msb
Now I can use tensorflow-2.0 alpha
in CentOS 6.5
.
ref: https://serverkurma.com/linux/how-to-update-glibc-newer-version-on-centos-6-x/