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
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!
A solution that worked for me was:
conda install -c anaconda libstdcxx-ng
I solved this by
conda install libgcc=5.2.0
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!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With