CentOS 7: libstdc++.so.6: version `CXXABI_1.3.9' not found
Facing a similar problem with zmq on CentOS 7 I come up with a workaround since a fresh installation and environment did not help.
The original issue was:
(mtango-py)$ python -c "import zmq"
...
ImportError: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /home/me/opt/miniconda2/envs/mtango-py/lib/python3.5/site-packages/zmq/backend/cython/../../../../../libzmq.so.5.1.2)
By loading the library before anything with LD_PRELOAD:
(mtango-py)$ export LD_PRELOAD=$CONDA_PREFIX/lib/libstdc++.so
(mtango-py)$ python -c "import zmq"
(mtango-py)$
This answer does not resolve the root problem tough. Conda should load the environment library if the system is not compatible.
RTM
Updated on June 04, 2022Comments
-
RTM almost 2 years
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
>> 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
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/rmulpuri/anaconda/envs/tokyo/lib/python3.6/site-packages/google/protobuf/pyext/_message.cpython-36m-x86_64-linux-gnu.so)
-
vhardion about 6 yearsI finally found that some packages have been installed with sudo pip which broke the system modules with probably some incompatible wheels.