简体   繁体   中英

Getting ImportError /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version 'CXXABI_1.3.11' not found

I'm currently trying to run a Python program that uses RDKit and am facing an error. The get straight to the point, the complete traceback is:

Traceback (most recent call last):
  File "./main.py", line 4, in <module>
    from train import Trainer
  File "/home/user1/repo1/train.py", line 12, in <module>
    from utils import make_batches
  File "/home/user1/repo1/utils.py", line 9, in <module>
    from rdkit import Chem, DataStructs
  File "/home/user1/anaconda3/envs/user1conda/lib/python3.7/site-packages/rdkit/Chem/__init__.py", line 18, in <module>
    from rdkit import DataStructs
  File "/home/user1/anaconda3/envs/user1conda/lib/python3.7/site-packages/rdkit/DataStructs/__init__.py", line 13, in <module>
    from rdkit.DataStructs import cDataStructs
ImportError: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.11' not found (required by /home/user1/anaconda3/envs/user1/lib/python3.7/site-packages/rdkit/DataStructs/../../../../libRDKitDataStructs.so.1)

I've taken a look at this Git Issue and tried all the suggestions there, but none of them have worked. I also took a look at the following Stack Overflow questions as well: uwsgi: /usr/lib/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by /usr/lib/x86_64-linux-gnu/libicuuc.so.55 and /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version CXXABI_1.3.8' not found [closed] but the answers have not been able to solve my problem either.

For a bit more information:

  1. OS: Ubuntu 16.04
  2. Python version: 3.7.5
  3. Output of echo $LD_LIBRARY_PATH is currently nothing (I've tried to set this to what the answers have suggested).
  4. I'm currently using a Conda environment and also downloaded RDKit from Anaconda.

Would anyone know what the potential problem may be? I'm a bit perplexed as nothing seems to be working and I don't know where to start diagnosing the problem. Thanks in advance.

(This has been answered hundreds of times on StackOverflow)

This means the libRDKitDataStructs.so.1 library was built by a new version of GCC and your system compiler is an older version. The library depends on the version of libstdc++.so that comes with the new version, but it's finding the old one from your system compiler.

You need to ensure that the runtime linker knows how to find the new libstdc++.so , see https://gcc.gnu.org/onlinedocs/libstdc++/faq.html#faq.how_to_set_paths an https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dynamic_or_shared.html#manual.intro.using.linkage.dynamic

For all those stuck with a similar problem, update your Anaconda/Miniconda with the following command:

conda deactivate

conda update conda

It works for me, hope it can help someone.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM