728x90
While installing tensorflow on Centos 6, the library linking error occured.
First, libstdc++ (CXXABI) related error (error message is as following) can be easily solved by compile and make new version of the library.
ImportError: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.7' not found (required by /home/user/lib/python2.7/site-packages/tensorflow/python/_pywrap_tensorflow_internal.so)
I followed the procedure in the page https://www.jianshu.com/p/f7cd0e2416b9
wget http://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-5.4.0/gcc-5.4.0.tar.gz
tar -xvf gcc-5.4.0.tar.gz
cd gcc-5.4.0
mkdir build
cd build
../configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
make && sudo make install
sudo ldconfig
Instead of changing the original library file of /usr/lib64/libstdc++.so.6, I simply added library path to environment variable to avoid library crash.
LD_LIBRARY_PATH=/usr/local/lib64/:$LD_LIBRARY_PATH
export $LD_LIBRARY_PATH
Second, for the libc error, I installed the 2.17 version using RPM to avoid library crash again.
Copied from https://gist.github.com/harv/f86690fcad94f655906ee9e37c85b174
#! /bin/sh
# update glibc to 2.17 for CentOS 6
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-common-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-devel-2.17-55.el6.x86_64.rpm
wget http://copr-be.cloud.fedoraproject.org/results/mosquito/myrepo-el6/epel-6-x86_64/glibc-2.17-55.fc20/glibc-headers-2.17-55.el6.x86_64.rpm
sudo rpm -Uvh --force --nodeps glibc-2.17-55.el6.x86_64.rpm \
glibc-common-2.17-55.el6.x86_64.rpm \
glibc-devel-2.17-55.el6.x86_64.rpm \
glibc-headers-2.17-55.el6.x86_64.rpm
"--force --nodeps" is added because of the dependency problem.
Available libray versions can be found by
strings /usr/lib/libstdc++.so.6 | grep ABI
300x250