linuxanacondalibrosa

'GLIBCXX_3.4.30' not found for librosa in conda virtual environment (after trying out a lot of solutions)?


I am trying to import librosa, but I am thrown with this error:

/home/lakshya/anaconda3/envs/tff_env/lib/python3.9/site-packages/zmq/backend/cython/../../../../.././libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /home/lakshya/anaconda3/envs/tff_env/lib/python3.9/site-packages/scipy/fft/_pocketfft/pypocketfft.cpython-39-x86_64-linux-gnu.so)

I tried the following to fix it based on the other similar questions that I browsed through:

  1. sudo apt-get install libstdc++6

    It's output: libstdc++6 is already the newest version (10.2.1-6).

  2. sudo apt-get dist-upgrade

    It's output: 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

  3. strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX

    It's output: GLIBCXX version up to GLIBCXX_3.4.28

  4. conda install libgcc in my virtual env "tff_env"

    It's output: libgcc-7.2.0 installed in tff_env

  5. Pip installed the libgcc package in the virtual environment as well. Didn't work.

What can I do?

My OS: Debian GNU/Linux 11 (bullseye)


Solution

  • Just been tackling a similar problem, it looks like you need to ensure you have the latest version of gcc. Running:

    conda install -c conda-forge gcc=12.1.0
    

    Fixed the error for me.