7

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!

Community
  • 1
  • 1
Dr. Fabien Tarrade
  • 1,556
  • 6
  • 23
  • 49

4 Answers4

3

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.

3

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
tar -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
Aman Aggarwal
  • 17,619
  • 9
  • 53
  • 81
Serge Rogatch
  • 13,865
  • 7
  • 86
  • 158
2

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

Jason Carmona
  • 541
  • 4
  • 6
  • OP is clearly directed to centos (RHEL) systems.So this won't help. – Douy789 Sep 20 '19 at 13:05
  • The link in Serge's comment doesn't work anymore but his post has the instructions, whereas this post provides the link. So it is still useful. – Esmu Igors Aug 06 '21 at 10:14
0

For RHEL6, this is in the Software Collections.

I think (without citation) the devtoolsets are numbered according to what version gcc is included. devtoolset 8 will give you gcc 8. Much higher than 4.7 or 4.8.

subscription-manager repos --enable rhel-server-dts-6-rpms
yum install devtoolset-8-gcc-c++
source scl_source enable devtoolset-8
RWDJ
  • 734
  • 8
  • 13