- 尝试安装或更新一下这个动态库
sudo apt-get install libstdc++6
,通常这个库是默认安装的。 - 查看内容[1]:
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 |grep CXXABI'
libstdc++.so.6通常位于/usr/lib/libstdc++.so.6或/usr/lib/x86_64-linux-gnu/libstdc++.so.6,而根据标题中的错误信息,本人的情况属于后者。并且查看到的内容输出如下:
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.7,没有1.3.8
- 查看详细信息:
ll /usr/lib/x86_64-linux-gnu/libstdc++.so.6
(图1) - 搜索新版本:
sudo find /usr -name "libstdc++.so.*"
通常在/usr目录下就能找到,如果找不到,就到其他目录下再找找。搜索结果如下:
/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19
/usr/lib/x86_64-linux-gnu/libstdc++.so.6
/usr/share/gdb/auto-load/usr/lib/x86_64-linux-gnu/libstdc++.so.6.0.19-gdb.py
/usr/local/neurosoft/miniconda3/lib/libstdc++.so.6.0.24
/usr/local/neurosoft/miniconda3/lib/libstdc++.so.6
/usr/local/neurosoft/miniconda3/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc+ +.so.6.0.24
/usr/local/neurosoft/miniconda3/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc+ +.so.6
/usr/local/neurosoft/miniconda3/pkgs/libstdcxx-ng-7.2.0-h7a57d05_2/lib/libstdc++ .so.6.0.24
/usr/local/neurosoft/miniconda3/pkgs/libstdcxx-ng-7.2.0-h7a57d05_2/lib/libstdc++ .so.6
/usr/local/neurosoft/miniconda3/pkgs/libstdcxx-ng-7.2.0-h7a57d05_2/x86_64-conda_ cos6-linux-gnu/sysroot/lib/libstdc++.so.6.0.24
/usr/local/neurosoft/miniconda3/pkgs/libstdcxx-ng-7.2.0-h7a57d05_2/x86_64-conda_ cos6-linux-gnu/sysroot/lib/libstdc++.so.6
/usr/local/neurosoft/fsl5.0.10/fslpython/lib/libstdc++.so.6.0.24
/usr/local/neurosoft/fsl5.0.10/fslpython/lib/libstdc++.so.6
/usr/local/neurosoft/fsl5.0.10/fslpython/x86_64-conda_cos6-linux-gnu/sysroot/lib /libstdc++.so.6.0.24
/usr/local/neurosoft/fsl5.0.10/fslpython/x86_64-conda_cos6-linux-gnu/sysroot/lib /libstdc++.so.6
/usr/local/neurosoft/fsl5.0.10/fslpython/pkgs/libstdcxx-ng-7.2.0-h7a57d05_2/lib/ libstdc++.so.6.0.24
/usr/local/neurosoft/fsl5.0.10/fslpython/pkgs/libstdcxx-ng-7.2.0-h7a57d05_2/lib/ libstdc++.so.6
/usr/local/neurosoft/fsl5.0.10/fslpython/pkgs/libstdcxx-ng-7.2.0-h7a57d05_2/x86_ 64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6.0.24
/usr/local/neurosoft/fsl5.0.10/fslpython/pkgs/libstdcxx-ng-7.2.0-h7a57d05_2/x86_ 64-conda_cos6-linux-gnu/sysroot/lib/libstdc++.so.6
/usr/local/neurosoft/matlabR2016b/sys/os/glnxa64/libstdc++.so.6.0.20
/usr/local/neurosoft/matlabR2016b/sys/os/glnxa64/libstdc++.so.6
/usr/local/neurosoft/anaconda2/lib/libstdc++.so.6.0.24
/usr/local/neurosoft/anaconda2/lib/libstdc++.so.6
/usr/local/neurosoft/anaconda2/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++ .so.6.0.24
/usr/local/neurosoft/anaconda2/x86_64-conda_cos6-linux-gnu/sysroot/lib/libstdc++ .so.6
/usr/local/neurosoft/anaconda2/pkgs/libstdcxx-ng-7.2.0-hdf63c60_3/lib/libstdc++. so.6.0.24
/usr/local/neurosoft/anaconda2/pkgs/libstdcxx-ng-7.2.0-hdf63c60_3/lib/libstdc++. so.6
/usr/local/neurosoft/anaconda2/pkgs/libstdcxx-ng-7.2.0-hdf63c60_3/x86_64-conda_c os6-linux-gnu/sysroot/lib/libstdc++.so.6.0.24
/usr/local/neurosoft/anaconda2/pkgs/libstdcxx-ng-7.2.0-hdf63c60_3/x86_64-conda_c os6-linux-gnu/sysroot/lib/libstdc++.so.6
/usr/local/neurosoft/freesurfer6.0.0/MCRv80/sys/os/glnxa64/libstdc++.so.6.0.13
/usr/local/neurosoft/freesurfer6.0.0/MCRv80/sys/os/glnxa64/libstdc++.so.6
由于本人是在使用PyCharm的调试功能的时候,遇到的这个问题。当时用的python解释器来自anaconda2,所以我优先关注其下的/usr/local/neurosoft/anaconda2/lib/libstdc++.so.6。
- 查看内容:
strings /usr/local/neurosoft/anaconda2/lib/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.8
- 查看详细信息:
ll /usr/local/neurosoft/anaconda2/lib/libstdc++.so.6
(图2) - 复制动态库:
sudo cp /usr/local/neurosoft/anaconda2/lib/libstdc++.so.6.0.24 /usr/lib/x86_64-linux-gnu/
- 改变软连接的指向
sudo rm libstdc++.so.6
sudo ln -s libstdc++.so.6.0.24 libstdc++.so.6
- 结束