Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"'CXXABI_1.3.8' not found" in tensorflow-gpu - install from source

I have re-installed Anaconda2. And I got the following error when 'python -c 'import tensorflow''

ImportError: /home/jj/anaconda2/bin/../lib/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/jj/anaconda2/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow.so)

environment

  • CUDA8.0
  • cuDNN 5.1
  • gcc 5.4.1
  • tensorflow r0.10
  • Anaconda2 : 4.2

the following is in bashrc file

  • export PATH="/home/jj/anaconda2/bin:$PATH"
  • export CUDA_HOME=/usr/local/cuda-8.0
  • export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}
  • export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
like image 340
user6918955 Avatar asked Oct 04 '16 05:10

user6918955


2 Answers

Seems to be a problem with Anaconda 4.*

You can either update the libgcc package to match your local version

conda update libgcc

but this will require downgrading "due to dependency conflicts" next time you update anaconda.

OR you can mask the anaconda libstdc++ so that your system's libstdc++ is used

cd ~/anaconda2/lib
mv libstdc++.so libstdc++.so.bkp
mv libstdc++.so.6 libstdc++.so.6.bkp

You can further (optionally) create a softlink inside the anaconda lib directly

ln -s /usr/lib/x86_64-linux-gnu/libstdc++.so.6 libstdc++.so.6

These worked for me for the same problem for built-from-source (non-gpu support) tensorflow, Ubuntu 16.04, Anaconda 4.2.0.

Sources: Similar problem to Building TensorFlow from source on Ubuntu 16.04 w/ GPU: `GLIBCXX_3.4.20' not found which also points back to this.

like image 55
gevang Avatar answered Oct 20 '22 21:10

gevang


I solved this problem by copying the libstdc++.so.6 file which contains version CXXABI_1.3.8.

Try run the following search command first:

$ strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep CXXABI_1.3.8

If it returns CXXABI_1.3.8. Then you can do the copying.

$ cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /home/jj/anaconda2/bin/../lib/libstdc++.so.6

like image 13
Xer Avatar answered Oct 20 '22 22:10

Xer