Tag Archives: ImportError: /lib64/libc.so.6: version `GLIBC_2.17′

ImportError: /lib64/libc.so.6: version `GLIBC_2.17′ problem solved

After installing the latest TensorFlow (>=1.10), when loading TensorFlow, it prompts that the Glibc version is too low and needs to be upgraded to the specified version.

ImportError: /lib64/libc.so.6: version `GLIBC_2.17′ not found (required by /usr/local/python3.6/lib/python3.6/site-packages/tensorflow/python/_pywrap_tensorflow.so)
1 , Download, unzip:

cd /usr/local
wget https://ftp.gnu.org/gnu/glibc/glibc-2.17.tar.gz

tar -zxvf glibc-2.17.tar.gz
at https://ftp.gnu.org/gnu/ Choose to download the corresponding version in glibc/ or http://ftp.twaren.net/Unix/GNU/gnu/libc/.

2. Compile and install:

cd glibc-2.17
./configure –prefix=/usr –disable-profile –enable-add-ons –with-headers=/usr/include –with-binutils=/usr/bin
At this time, the following error message is reported :

 

It means that it must be compiled in a new directory. Solution: Create a new directory, then enter the directory, and compile with the absolute path.

cd /usr/local/glibc-2.17

mkdir build
cd build

../configure –prefix=/usr –disable-profile –enable-add-ons –with-headers=/usr/include –with-binutils=/usr/bin
Then

# make
# make install
3. If the ls directory cannot be used at this step, /lib64/libc.so.6 has not been updated. Need to rebuild the soft connection, but first solve the problem that the command cannot be used.

Command recovery:

# LD_PRELOAD=/lib64/libc-2.17.so
Set the soft connection, first delete the old one:

# rm /lib64/libc.so.6
# ln -s /lib64/libc-2.17.so /lib64/libc.so.6 To
view the details of glib, execute:

# 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_2.13
GLIBC_2.14
GLIBC_2.15
GLIBC_2.16
GLIBC_2.17
GLIBC_PRIVATE
You can see the highest version supported.
4. Check:

# 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.