I have installed the Tensorflow bindings with python successfully. But when I try to import Tensorflow, I get the follwoing error.
ImportError: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.17' not found (required by /usr/local/lib/python2.7/dist-packages/tensorflow/python/_pywrap_tensorflow.so)
I have tried to update GLIBC_2.15 to 2.17, but no luck.
This post was edited by Jainew Nanda at September 3, 2020 4:27 PM IST
I had the same problem, so googling I made these steps:
And to exit:
That works for me.
That error mainly arises if your GNU C-Library is not up-to-date. You can check what version you're running using a simple
$ ldd --version
The output should be like this:
ldd (Ubuntu EGLIBC 2.19-0ubuntu6.6) 2.19
Copyright (C) 2014 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.
The 2.19 is your GLIBC version. To upgrade you can visit the GNU-C Library project website and download the latest version. The link to the latest glibc is here : GNU-C library Download At the time of writing this answer the latest stable version was 2.22.
I tried running tensorflow on both Ubuntu 12.04 and 14.04. Ubuntu 14.04 doesn't throw this issue as it comes with glibc 2.19 installed by default.
Hope it helps.
I tried @shivakumar kota's solution and still had an annoying:
ImportError: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found
I am on CentOS 6.7, it also lacks an updated c++ standard lib, so to build on BR_User solution I extracted the correct libstdc++ package, however I found no need for the virtual environment.
Supposing you have already installed tensorflow, it gives:
mkdir ~/my_libc_env
cd ~/my_libc_env
wget http://launchpadlibrarian.net/137699828/libc6_2.17-0ubuntu5_amd64.deb
wget http://launchpadlibrarian.net/137699829/libc6-dev_2.17-0ubuntu5_amd64.deb
wget ftp.riken.jp/Linux/scientific/7.0/x86_64/os/Packages/libstdc++-4.8.2-16.el7.x86_64.rpm
ar p libc6_2.17-0ubuntu5_amd64.deb data.tar.gz | tar zx
ar p libc6-dev_2.17-0ubuntu5_amd64.deb data.tar.gz | tar zx
rpm2cpio libstdc++-4.8.2-7mgc30.x86_64.rpm| cpio -idmv
and then run python with:
LD_LIBRARY_PATH="$HOME/my_libc_env/lib/x86_64-linux-gnu/:$HOME/my_libc_env/usr/lib64/" $HOME/my_libc_env/lib/x86_64-linux-gnu/ld-2.17.so `which python`
This post was edited by Viaan Prakash at September 16, 2020 1:00 PM IST