skip to Main Content

I’m trying to install bern2 locally. bern2 installed successfully. when I started running, I got this error.

ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30′ not found (required by /opt/conda/envs/bern2/lib/python3.11/site-packages/faiss/../../../libfaiss.so)

from normalizers.neural_normalizer import NeuralNormalizer
  File "/home/ubuntu/BERN2/BERN2/normalizers/neural_normalizer.py", line 17, in <module>
    import faiss
  File "/opt/conda/envs/bern2/lib/python3.11/site-packages/faiss/__init__.py", line 18, in <module>
    from .loader import *
  File "/opt/conda/envs/bern2/lib/python3.11/site-packages/faiss/loader.py", line 65, in <module>
    from .swigfaiss import *
  File "/opt/conda/envs/bern2/lib/python3.11/site-packages/faiss/swigfaiss.py", line 10, in <module>
    from . import _swigfaiss
ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /opt/conda/envs/bern2/lib/python3.11/site-packages/faiss/../../../libfaiss.so)
Traceback (most recent call last):
  File "/home/ubuntu/BERN2/BERN2/server.py", line 1, in <module>
    from app import create_app
  File "/home/ubuntu/BERN2/BERN2/app/__init__.py", line 12, in <module>
    import bern2
  File "/home/ubuntu/BERN2/BERN2/bern2/__init__.py", line 1, in <module>
    from bern2.bern2 import BERN2
  File "/home/ubuntu/BERN2/BERN2/bern2/bern2.py", line 22, in <module>
    from normalizer import Normalizer
  File "/home/ubuntu/BERN2/BERN2/bern2/normalizer.py", line 11, in <module>
    from normalizers.neural_normalizer import NeuralNormalizer
  File "/home/ubuntu/BERN2/BERN2/normalizers/neural_normalizer.py", line 17, in <module>
    import faiss
  File "/opt/conda/envs/bern2/lib/python3.11/site-packages/faiss/__init__.py", line 18, in <module>
    from .loader import *
  File "/opt/conda/envs/bern2/lib/python3.11/site-packages/faiss/loader.py", line 65, in <module>
    from .swigfaiss import *
  File "/opt/conda/envs/bern2/lib/python3.11/site-packages/faiss/swigfaiss.py", line 10, in <module>
    from . import _swigfaiss
ImportError: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /opt/conda/envs/bern2/lib/python3.11/site-packages/faiss/../../../libfaiss.so)

2

Answers


  1. The reason could be that the system path is not configured correctly. Try this,

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib/

    Source:
    https://www.tensorflow.org/install/pip

    Login or Signup to reply.
  2. it works for me that update libstdc++

    sudo add-apt-repository ppa:ubuntu-toolchain-r/test 
    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get dist-upgrade
    

    check the result

    strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search