Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Anaconda libstdc++.so.6: version `GLIBCXX_3.4.20' not found

I am using anaconda for python and I face this problem I tried a lot to solve this error, but still not solved.

I used the following commands so far

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

conda install libgcc

in this link a solution provided but I still don't know how to do that

like image 486
user8523104 Avatar asked Jan 25 '18 23:01

user8523104


4 Answers

I ran into a similar problem.

ImportError: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found 

I've solved it. Steps as follows:

try conda install -c anaconda libstdcxx-ng, // didn't work
try conda update libstdcxx-ng // didn't work too

But when I execute the command: locate libstdc++.so.6, found amazing things such as: /root/anaconda3/lib/libstdc++.so.6.0.26, which apparently is newer than .so.6.0.

I try:

strings /root/anaconda3/lib/libstdc++.so.6.0.26 | grep GLIBC
see [GLIBCXX_3.4.20][1]

That's the file I want to find.

Next step: ls -l /root/anaconda3/lib/libstdc++.so.6.0.26 - Check the file is true, not a link.

Next step: copy /root/anaconda3/lib/libstdc++.so.6.0.26 to /lib64.

Next step: ls -l /lib64/libstdc++.so.6 - It's a soft link, so I can remove it without worry.

Next step: rm -rf /lib64/libstdc++.so.6

Next step: make a new soft link by: ln -s libstdc++.so.6.0.26 libstdc++.so.6

That's all. I run my code without error.

God give me wisdom, Glory to God!

like image 167
Frame Li Avatar answered Oct 27 '22 00:10

Frame Li


A solution that worked for me was:

conda install -c anaconda libstdcxx-ng

like image 37
pebox11 Avatar answered Oct 27 '22 00:10

pebox11


I solved this by

conda install libgcc=5.2.0
like image 33
ceiling cat Avatar answered Oct 27 '22 00:10

ceiling cat


I meet the same problem, which is when I run jupyter notebook, I got

ImportError: /home/cugtyt/software/miniconda3/lib/python3.6/site-packages/zmq/backend/cython/../../../../.././libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/cugtyt/software/miniconda3/lib/python3.6/site-packages/zmq/backend/cython/../../../../../libzmq.so.5)

I solve it by doing this:

conda uninstall gcc

Hope it can help u!

like image 31
user9563571 Avatar answered Oct 27 '22 00:10

user9563571