ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.8‘ not found

问题

Traceback (most recent call last):
  File "service_corrector.py", line 15, in 
    from opencc import OpenCC
  File "/home/gstools/MuCGEC/MuCGEC_env/lib/python3.8/site-packages/opencc/__init__.py", line 6, in 
    from opencc.clib import opencc_clib
ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /home/gstools/MuCGEC/MuCGEC_env/lib/python3.8/site-packages/opencc/clib/opencc_clib.cpython-38-x86_64-linux-gnu.so)

定位问题

因/lib64/libstdc++.so.6库版本过低,执行以下命令来查看此动态库所支持的CXXABI版本。

]# sudo strings /lib64/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、下载libstdc++.so.6.zip 解压放到/usr/lib64/目录下(下载网址),删除原先的软连接,再建立新的软连接。

]# rm /usr/lib64/libstdc++.so.6
]# ln -s /usr/lib64/libstdc++.so.6.0.26 /usr/lib64/libstdc++.so.6

2、再次查看CXXABI版本,问题解决。

]# sudo strings /lib64/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_1.3.12
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.12
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

你可能感兴趣的:(环境问题报错,linux,python)