Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found

Tags:

python

I am getting the following error:

ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /home/wasiahmad/software/anaconda3/lib/python3.6/site-packages/matplotlib/_path.cpython-36m-x86_64-linux-gnu.so)

at this line:

import matplotlib.pyplot as plt

I have visited issues reported in Github and StackOverflow and followed them but still couldn't solve the problem.

Solutions checked:

  • https://stackoverflow.com/a/41703611/5352399
  • https://stackoverflow.com/a/39856855/5352399
  • https://github.com/AllenDowney/ThinkStats2/issues/92 (exactly facing this issue but the provided solution didn't work for me)

I have checked that the file: libstdc++.so.6 is located at /home/wasiahmad/software/anaconda3/lib/ and I ran the following command:

$ strings ~/software/anaconda3/lib/libstdc++.so.6 | grep CXXABI_1.3.9

and it returns CXXABI_1.3.9.

But I still can't figure out what is the problem. Any help would be appreciated.

like image 659
Wasi Ahmad Avatar asked Apr 17 '18 10:04

Wasi Ahmad


1 Answers

Adding /home/wasiahmad/software/anaconda3/lib/ to the LD_LIBRARY_PATH solved the problem. Thanks to Knud Larsen for his comment and the reminder that /lib64/libstdc++.so.6 currently comes first in LD_LIBRARY_PATH.

like image 73
Wasi Ahmad Avatar answered Sep 18 '22 14:09

Wasi Ahmad