7

I am installing a package with pip in my conda environment and I keep getting this error:

ImportError: /home/anavani/anaconda3/envs/dmcgb/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.30' not found (required by /lib/x86_64-linux-gnu/libLLVM-13.so.1)

I looked on previous stack overflow posts and found this and I followed what the top comment said to do and ran these commands:

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

When I run strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX to check the latest version of GLIBCXX, I get this output:

GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28
GLIBCXX_3.4.29
GLIBCXX_3.4.30

so I'm not sure what's wrong as GLIBCXX_3.4.30 is installed.

Any help would be appreciated. I am running Ubuntu 22.04 LTS

andrew.46
  • 37,085
  • 25
  • 149
  • 228
oofmeister27
  • 71
  • 1
  • 1
  • 3
  • 1
    I don't know about your particular situation, but the `strings` command you give is just finding alphanum strings in a library file; if you want to know if the system sees that library look at `ldd`. Also, your error relates to a file beneath your home folder but that strings command is operating on a file in /usr/lib. – pbhj Jul 31 '22 at 21:46

3 Answers3

7

I got a very similar issue, and solved it by linking the the lib file into the conda environment. For your situation you may try something like this:

ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 /home/anavani/anaconda3/envs/dmcgb/bin/../lib/libstdc++.so.6
Jason
  • 171
  • 2
1

I also meet with the similar problem, with the answer by Jason, I use "ln" command to solve it. Because I already had the GLIBCXX_3.4.30 in /usr/lib/x86_64-linux-gnu/libstdc++.so.6. Then link it with library used in cython. Scipy package usually appears this kind of problem.

ln -sf /usr/lib/x86_64-linux-gnu/libstdc++.so.6 $HOME/miniconda3/envs/myenv/lib/python3.8/site-packages/zmq/backend/cython/../../../../.././libstdc++.so.6
CaCaSun
  • 11
  • 1
1

Had the same issue, seems that installing cmake via conda does the trick.

conda install cmake
AndreiM
  • 11
  • 1