how to find libstdc++.so.6: that contain GLIBCXX_3.4.19 for RHEL 6?

只愿长相守 提交于 2019-12-13 15:24:49

问题


I work with a Linuxs server:

> cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.7 (Santiago)

(from wikipedia: Red Hat Enterprise Linux 6 was forked from Fedora 12

6.7, also termed Update 7, 22 July 2015 (kernel 2.6.32-573)
6.8, also termed Update 8, 10 May 2016 (kernel 2.6.32-642))

The kernel

> uname -r
2.6.32-642.11.1.el6.x86_64

> uname -s
Linux

> uname -v
#1 SMP Tue Nov 15 22:57:18 EST 2016

> cat /proc/version
Linux version 2.6.32-642.11.1.el6.x86_64 (sandman@node3res7) (gcc version 4.4.7 20120313 (SuSE 4.4.7-17) (GCC) ) 
#1 SMP Tue Nov 15 22:57:18 EST 2016

gcc version

> gcc --version
gcc (GCC) 4.4.7 20120313 (SuSE 4.4.7-17)

when trying to install Tensdorflow, I have some issue with a missing library:

ImportError: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.19' not found (required by /opt/ccda/anaconda2/envs/tensorflow35/lib/python3.5/site-packages/tensorflow/python/_pywrap_tensorflow.so)

As you can see in my lib64/libstdc++.so.6 I don't have GLIBCXX_3.4.19

strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX
GLIBCXX_3.4 
GLIBCXX_3.4.1  
....  
GLIBCXX_3.4.12  
GLIBCXX_3.4.13  
GLIBCXX_FORCE_NEW  
GLIBCXX_DEBUG_MESSAGE_LENGTH 

I look with the following command:

yum whatprovides */libstdc++.so.6
...
libstdc++-4.4.7-17.el6.x86_64 : GNU Standard C++ Library
Repo        : installed
Matched from:
Filename    : /usr/lib64/libstdc++.so.6

so my question where can I find the libstdc++-4.x.y-z.el6.x86_64 that contain GLIBCXX_3.4.19 and that I could install on my server RHEL 6 with my gcc version ?

I am a little bit confuse of which version to use from this page https://www.rpmfind.net/linux/rpm2html/search.php?query=libstdc%2B%2B.so.6%28GLIBCXX_3.4.19%29&submit=Search+...&system=&arch=

  1. I don't see a version for Fedora 12 or RHEL6
  2. I need arch x86_64
  3. I need I guess something gcc (GCC) 4.4.7
  4. I guess I need 64bit

I the following a good macth ? I am quite confuse by the name and info:

libstdc++6-gcc48-32bit-4.8.5-21.1.x86_64.html   The standard C++ shared library OpenSuSE leap updates for 42.1  libstdc++6-gcc48-32bit-4.8.5-21.1.x86_64.rpm

I don't have Internet access on the server so I need to download the file locally copy it on the server and do the intsallion.

Thanks for your help
Cheers
Fabien

ps: bonus question SuSE 4.4.7-17 (GCC), I am confuse, I understood that Suse was a Linux distribution like Redhat!


回答1:


I found a solution here: https://www.linuxquestions.org/questions/red-hat-31/lib-libstdc-so-6-version-%60glibcxx_3-4-15'-not-found-4175419985/

Replacing libstdc++-so.6 with a later version that works in EL6: Unpack libstdc++6_4.7.1-2_i386.deb http://ftp.de.debian.org/debian/pool...7.1-2_i386.deb with : ar -x libstdc++6_4.7.1-2_i386.deb && tar xvf data.tar.gz Next : 1) su ; 2) cp libstdc++.so.6.0.17 /usr/lib/ 3) cd /usr/lib/ && rm libstdc++.so.6 4) ln -s libstdc++.so.6.17 libstdc++.so.6

Reason for suggesting the Debian package : It's a ( gcc ) libstdc++ version that's compiled with a glibc old enough to be used in EL6 / CentOS 6.




回答2:


Updated steps (because it seems the file has been moved):

curl -O http://ftp.de.debian.org/debian/pool/main/g/gcc-4.7/libstdc++6-4.7-dbg_4.7.2-5_i386.deb
ar -x libstdc++6-4.7-dbg_4.7.2-5_i386.deb && tar xvf data.tar.gz
mkdir backup
cp /usr/lib/libstdc++.so* backup/
cp ./usr/lib/i386-linux-gnu/debug/libstdc++.so.6.0.17 /usr/lib
ln -s libstdc++.so.6.0.17 libstdc++.so.6



回答3:


Previous link is dead now as well, you can use this one

http://ftp.de.debian.org/debian/pool/main/g/gcc-4.8/libstdc++6-4.8-dbg_4.8.4-1_i386.deb

In previous comment from Serge, there's a cd missing cd /usr/lib/ Or like in my case cd /usr/lib64



来源:https://stackoverflow.com/questions/42597701/how-to-find-libstdc-so-6-that-contain-glibcxx-3-4-19-for-rhel-6

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!