Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libstdc++.so.6: version `GLIBCXX_3.4.26' not found #469

Closed
dav2017 opened this issue Mar 22, 2020 · 4 comments
Closed

libstdc++.so.6: version `GLIBCXX_3.4.26' not found #469

dav2017 opened this issue Mar 22, 2020 · 4 comments

Comments

@dav2017
Copy link

dav2017 commented Mar 22, 2020

Recently, using PyPlot resulted in the following error:

ERROR: InitError: PyError (PyImport_ImportModule

The Python package matplotlib could not be found by pyimport. Usually this means
that you did not install matplotlib in the Python version being used by PyCall.
[...]
ImportError("/usr/local/julia-1.4.0/bin/../lib/julia/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /usr/lib/python3.8/site-packages/matplotlib/ft2font.cpython-38-x86_64-linux-gnu.so)")

My system: Manjaro Linux
Julia version: both 1.3.1 and 1.4.0

It turns out to be the same error described here on discourse and temporarily solved in the same way. libstdc++ coming with Julia is outdated compared to the system one.
A workaround is to copy (or link) the system libstdc++.so.6 to the Julia folder:
cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 $JULIA_HOME/lib/julia/

@stevengj
Copy link
Member

stevengj commented Apr 3, 2020

You can also use LD_PRELOAD when you launch Julia, probably.

But I don't think this is fixable in PyPlot — by the time PyPlot is loaded, Julia has already loaded its C++ library. So we have to wait for JuliaLang/julia#34276 to be fixed.

@stevengj stevengj closed this as completed Apr 3, 2020
@mvanzulli
Copy link

Recently, using PyPlot resulted in the following error:

ERROR: InitError: PyError (PyImport_ImportModule

The Python package matplotlib could not be found by pyimport. Usually this means
that you did not install matplotlib in the Python version being used by PyCall.
[...]
ImportError("/usr/local/julia-1.4.0/bin/../lib/julia/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /usr/lib/python3.8/site-packages/matplotlib/ft2font.cpython-38-x86_64-linux-gnu.so)")

My system: Manjaro Linux Julia version: both 1.3.1 and 1.4.0

It turns out to be the same error described here on discourse and temporarily solved in the same way. libstdc++ coming with Julia is outdated compared to the system one. A workaround is to copy (or link) the system libstdc++.so.6 to the Julia folder: cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 $JULIA_HOME/lib/julia/

This worked perfect for me using Manjaro unstable servers and julia-bin from arch. THX 💯

@volkerkarle
Copy link

I have the same problem and I also created a symlink to libstdc++.so.6 like described above to fix it. However, that is not a long-term solution!

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

@dav2017
Copy link
Author

dav2017 commented Dec 1, 2022

On my system the library is now:
/usr/lib/libstdc++.so.6.0.30

so I create these links in /path/to/julia-1.8.3/lib/julia:

libstdc++.so -> /usr/lib/libstdc++.so.6.0.30
libstdc++.so.6 -> /usr/lib/libstdc++.so.6.0.30
libstdc++.so.6.0.30 -> /usr/lib/libstdc++.so.6.0.30

The problem should be definitely solved in julia-1.9:
https://github.com/JuliaLang/julia/blob/v1.9.0-alpha1/NEWS.md#external-dependencies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants