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

Issues related to applications and software problems
Post Reply
Lannister
Posts: 1
Joined: 2018/02/16 19:17:18

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

Post by Lannister » 2018/02/16 19:24:06

I am running a python script using PyCharm on CentOS 7. The script imports tensorflow and allocates some potion of GPU memory to the script.

The script worked fine without any issues until yesterday. I am not sure why this happened. I am running the following versions of gcc and libstdc++ on CentOS

Code: Select all

>> rpm -qf /usr/lib/libstdc++.so.6
libstdc++-4.8.5-16.el7_4.1.i686

>> echo $LD_LIBRARY_PATH
/usr/local/lib64/:/usr/local/cuda-8.0/lib64:/usr/lib64/mpich/lib:/usr/local/cuda/lib64:/usr/local/cuda/extras/CUPTI/lib64

>> echo $LD_PRELOAD

blank output

>> hostnamectl

  Operating System: CentOS Linux 7 (Core)
       CPE OS Name: cpe:/o:centos:centos:7
            Kernel: Linux 3.10.0-693.2.2.el7.x86_64
      Architecture: x86-64
I have libgcc 7.2.0 version in my anaconda environment.

Some of the stackflow answers addressing this issue is related to Ubuntu system and not CentOS

I received the following error while importing tensorflow

Code: Select all

from google.protobuf import descriptor as _descriptor
  File "/home/user_name/anaconda/envs/tokyo/lib/python3.6/site-packages/google/protobuf/descriptor.py", line 46, in <module>
    from google.protobuf.pyext import _message
ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /home/username/anaconda/envs/env_name/lib/python3.6/site-packages/google/protobuf/pyext/_message.cpython-36m-x86_64-linux-gnu.so)
I went through this link to find out the the correct version of libstdc for `CXXABI_1.3.9' and the requirement is libstdc++.so.6.0.21.

So I ran this code to check my libstdc++ version

Code: Select all

>> ls -l  /usr/lib/libstdc++.so.6
lrwxrwxrwx. 1 root root 19 Feb  4 00:17 /usr/lib/libstdc++.so.6 -> libstdc++.so.6.0.19
How can I (or should I even) update my libstdc to 6.0.21 to run tensorflow code on my centos system
Last edited by Lannister on 2018/02/18 22:08:27, edited 1 time in total.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: libstdc++.so.6: version `CXXABI_1.3.9' not found

Post by TrevorH » 2018/02/17 12:45:25

ImportError: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /home/rmulpuri/anaconda/envs/tokyo/lib/python3.6/site-packages/google/protobuf/pyext/_message.cpython-36m-x86_64-linux-gnu.so)
Your problem is that that file is not built to run on CentOS. You need to rebuild it or download a different copy that isn't linked against a newer glibc than we ship. Do not attempt to shoehorn a newer libc onto your system or everything else will break. It is the app that needs fixing.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

tunk
Posts: 1205
Joined: 2017/02/22 15:08:17

Re: libstdc++.so.6: version `CXXABI_1.3.9' not found

Post by tunk » 2018/02/17 13:40:27

Probably barking up the wrong tree: You're checking for the 32 bit version of the library, whereas it looks like your software is 64 bit?
Check and maybe reinstall the 64 bit version? Also, given that it worked up to yesterday, either the OS, setup or software must have changed?

Post Reply