1、ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found:
gcc-5.4.0包含的libstdc++.so.6.0.21包含CXXABI_1.3.9
gcc下载:https://ftp.gnu.org/gnu/gcc/下载gcc-5.4.0.tar.bz2
su
tar -jxvf gcc-6.1.0.tar.bz2
cd gcc-5.4.0
./contrib/download_prerequisites
mkdir build
cd build
../configure -enable-checking=release -enable-languages=c,c++ -disable-multilib
make
make install
查看libstdc++.so.6
find / -name 'libstdc++.so.6*'
/usr/lib64/libstdc++.so.6
/usr/lib64/libstdc++.so.6.0.19
/usr/lib64/libstdc++.so.6.0.21
/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.py
/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.pyc
/usr/share/gdb/auto-load/usr/lib64/libstdc++.so.6.0.19-gdb.pyo
/usr/local/lib64/libstdc++.so.6.0.21
/usr/local/lib64/libstdc++.so.6.0.21-gdb.py
/usr/local/lib64/libstdc++.so.6
查看动态库
strings /usr/lib64/libstdc++.so.6 | grep 'CXXABI'
发现没有1.3.9
CXXABI_1.3
CXXABI_1.3.1
CXXABI_1.3.2
CXXABI_1.3.3
CXXABI_1.3.4
CXXABI_1.3.5
CXXABI_1.3.6
CXXABI_1.3.7
CXXABI_1.3.8
CXXABI_TM_1
查看libstdc++.so.6.0.21的动态库
strings /usr/local/lib64/libstdc++.so.6.0.21 | grep 'CXXABI'
CXXABI_1.3
CXXABI_1.3.1
CXXABI_1.3.2
CXXABI_1.3.3
CXXABI_1.3.4
CXXABI_1.3.5
CXXABI_1.3.6
CXXABI_1.3.7
CXXABI_1.3.8
CXXABI_1.3.9
CXXABI_TM_1
CXXABI_FLOAT128
CXXABI_1.3
CXXABI_1.3.2
CXXABI_1.3.6
CXXABI_FLOAT128
CXXABI_1.3.9
CXXABI_1.3.1
CXXABI_1.3.5
CXXABI_1.3.8
CXXABI_1.3.4
CXXABI_TM_1
CXXABI_1.3.7
CXXABI_1.3.3
将/usr/local/lib64/libstdc++.so.6.0.21复制到/usr/lib64/
cp /usr/local/lib64/libstdc++.so.6.0.21 /usr/lib64/
查看libstdc++.so.6的软链接
ls -l /usr/lib64/libstdc++.so*
会展示出现在链接的文件和链接的历史
lrwxrwxrwx. 1 root root 19 7月 12 08:57 /usr/lib64/libstdc++.so.6 -> libstdc++.so.6.0.21
-rwxr-xr-x. 1 root root 991616 4月 24 22:24 /usr/lib64/libstdc++.so.6.0.19
-rwxr-xr-x. 1 root root 11060528 7月 12 08:55 /usr/lib64/libstdc++.so.6.0.21
删除旧的链接
rm -rf /usr/lib64/libstdc++.so.6
进入/usr/lib64新建软链接
ln -s libstdc++.so.6.0.21 libstdc++.so.6
查看链接是否成功
ls -l /usr/lib64/libstdc++.so*