赞
踩
项目github地址:bitcarmanlee easy-algorithm-interview-and-practice
欢迎大家star,留言,一起学习进步
在运行某个Python代码的时候,IDE里报了下面的错误。
ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /home/leilei/anaconda2/lib/python2.7/site-packages/scipy/sparse/_sparsetools.so)
很明显是动态库的问题,解决方案如下
cd /usr/lib/x86_64-linux-gnu
sudo strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | 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_TM_1
确实没有1.3.9版本,gcc的动态库是旧版本。说明当时生成的动态库没有替换老版本的gcc动态库。
sudo find / -name "libstdc++.so.6*"
最后出来的结果很多
/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
...
/home/leilei/anaconda2/pkgs/libstdcxx-ng-8.2.0-hdf63c60_1/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6
/home/leilei/anaconda2/pkgs/libstdcxx-ng-8.2.0-hdf63c60_1/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6.0.25
...
cp /home/leilei/anaconda2/pkgs/libstdcxx-ng-8.2.0-hdf63c60_1/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6.0.25 /usr/lib/x86_64-linux-gnu/
先cd 进入/usr/lib/x86_64-linux-gnu,然后删除原来的软连接
cd /usr/lib/x86_64-linux-gnu
sudo rm -rf libstdc++.so.6
sudo ln -s libstdc++.so.6.0.25 libstdc++.so.6
sudo strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | 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_1.3.10
CXXABI_1.3.11
CXXABI_TM_1
CXXABI_FLOAT128
CXXABI_1.3
CXXABI_1.3.11
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.10
CXXABI_1.3.3
其中就包含了我们所需要的1.3.9版本。
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。