Version `GLIBCXX_X' not found but is present in strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX

Hey all!

As in the title - when I’m running my python code that requires GLIBCXX_3.4.29 I run into an error

Traceback (most recent call last):
  File "e_tests.py", line 10, in <module>
    import interface
ImportError: /home/ian/anaconda3/envs/crannog/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by X/so_file.so)

Looking around, the first step seems to be strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX which details if the file is there. However, mine actually already exists…

...  //misc entries
GLIBCXX_3.4.27
GLIBCXX_3.4.28
GLIBCXX_3.4.29// THIS IS IT
GLIBCXX_DEBUG_MESSAGE_LENGTH
_ZNKSt14basic_ifstreamIcSt11char_traitsIcEE7is_openEv@GLIBCXX_3.4
_ZNSt13basic_istreamIwSt11char_traitsIwEE6ignoreEv@@GLIBCXX_3.4.5
_ZNKSbIwSt11char_traitsIwESaIwEE11_M_disjunctEPKw@GLIBCXX_3.4
_ZNKSt14basic_ifstreamIwSt11char_traitsIwEE7is_openEv@@GLIBCXX_3.4.5
...... // many more entries

I saw someone mention a pacman.conf (or more like multilib) in some thread I’ve now lost but here’s my pacman.conf

[options]
CacheDir = /var/cache/pacman/pkg/
HoldPkg      = pacman glibc manjaro-system
SyncFirst    = manjaro-system archlinux-keyring manjaro-keyring
Architecture = auto

CheckSpace
SigLevel    = Required DatabaseOptional
LocalFileSigLevel = Optional


[archlinuxfr]
SigLevel = Never
Server = http://repo.archlinux.fr/$arch

[core]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

[extra]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

[community]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

[multilib]
SigLevel = PackageRequired
Include = /etc/pacman.d/mirrorlist

Thanks for taking the time to read this! If I can provide any more details please let me know

Anaconda as far as I know does not use the system libs, therefore you’re missing something in your environment. Maybe install what you need with conda install <package>?

Hmm, do you know what I might install? I just tried conda install libgcc but ran into the same error. It seemed to work for some other people based on some stackoverflow post askubuntucom/a/786944

Perhaps try what’s suggested here:

https://unix.stackexchange.com/a/557929/241008

I think I have a similar problem (Cq-editor graphics not working due to missing libraries?) but I tried that and it doesn’t work

Ahh, sorry to hear :confused: I THINK mine is related to conda, but I’m not sure… I wish I could be more help but I’m also really not sure what to do. I for one am just trying to figure out how to get conda to use my system’s libgcc or whatever

my issue is also related to conda, the application cq-editor was installed through conda, I run it in a conda enviornment. I also get a missing GLIBCXX error even though I have it in /usr/lib64

Ahh, gotcha!I really don’t know what to do. I guess our options are:

  • force conda to use the system libgcc (running strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX shows that it exists at the system-level)

  • Update conda libgcc to a version where the necessary code is present but it seems like I’m already on the most recent version of libgcc there (7.2)

Any thoughts on this?

maybe these issues are related?:

I am unsure.

Ahh, crap, I did a quick scan through and it doesn’t seem to address the issue on my end. I’ll keep you posted on if I find anything elsewhere

yeah I can’t find anything either

if our problems are similar, this might be fixed by copying and pasting the correct library file into the conda enviornment library folder. maybe something similar to this solution i posted: Cq-editor graphics not working due to missing libraries? - #2 by hottoast

except you would change miniconda and cqgui to anaconda and crannog, also copy the libstdc++.so.6 file from /usr/lib64/ instead of /lib/

Heya!

So, I “solved” my issue by just deactivating conda and using venv instead. I know this isn’t realistic for all situations but it’s the best I’ve got…

maybe try

sudo mcopy /usr/lib64/libstdc++.so.6 ~/.conda/envs/crannog/lib  

next time? just making an educated guess, it might also have worked idk. just leaving this here if anyone else has this problem wants to try this way instead.

2 Likes

Just responding that this fixed my issue.

I tried running the tests on this project: SymSpellCppPy and even though I installed the requirements using poetry I got the following error:

ImportError: /home/user/miniconda3/bin/../lib/libstdc++.so.6: version 'GLIBCXX_3.4.29' not found (required by /home/user/repos/other/SymSpellCppPy/SymSpellCppPy.cpython-39-x86_64-linux-gnu.so)

Weird that it looked for this file in my miniconda3 directory…