LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-02-2015, 03:19 AM   #1
Mycado
Member
 
Registered: Jun 2006
Location: Paris, France
Distribution: RHEL
Posts: 73

Rep: Reputation: 15
Unhappy Searching for GLIBCXX_3.4.20


Hello,

I want to run a program on my rhel, but seems it's missing some glibc.

About the server:
Code:
[root@xxx bin]# uname -a
Linux telesto 3.10.0-229.el7.x86_64 #1 SMP Thu Jan 29 18:37:38 EST 2015 x86_64 x86_64 x86_64 GNU/Linux
[root@xxx bin]# more /etc/redhat-release
Red Hat Enterprise Linux Server release 7.1 (Maipo)
Bug from the app:
Code:
[root@xxx bin]# ./vcp 
./vcp: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./vcp)
I check in the libstdc lib:
Code:
[root@xxx MBT]# strings /usr/lib/libstdc++.so.6 | grep GLIBC
GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBC_2.3
GLIBC_2.0
GLIBC_2.4
GLIBC_2.1
GLIBC_2.1.3
GLIBC_2.3.2
GLIBC_2.2
GLIBCXX_DEBUG_MESSAGE_LENGTH
glic from rpm:
Code:
[root@xxx bin]# rpm -q glibc
glibc-2.17-78.el7.x86_64
glibc-2.17-78.el7.i686
[root@telesto bin]# rpm -qa glibc-devel
glibc-devel-2.17-78.el7.x86_64
This server isn't connected to the internet, and I want to know which package should I install to get the GLIBCXX_3.4.20.


Thanks!
 
Old 09-02-2015, 05:50 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,518

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Not "glibc" : G..LIBCXX.. means "gnu libc++", which we know as libstdc++, a gcc library.

GLIBCXX_3.4.20 is an object from the gcc-4.9.x libstdc++.so.6.0.20

The trick is to find a libstdc++-4.9.x, which is compiled with <=glibc-2.17 :

Found http://rpm.pbone.net/index.php3/stat...86_64.rpm.html
>>> ftp://ftp.pbone.net/mirror/ftp.sourc....99.x86_64.rpm
>> gcc-libstdc++-4.9.1-1.ram0.99.x86_64.rpm

Unpack the package in a new folder :
$ rpm2cpio gcc-libstdc++-4.9.1-1.ram0.99.x86_64.rpm | cpio -idmv
... and copy libstdc++.so.6.0.20 to /usr/lib64/
Next : 1) $ cd /usr/lib64/
2) # rm libstdc++.so.6
3) # ln -s libstdc++.so.6.0.20 libstdc++.so.6
... and you can use applications requiring "GLIBCXX_3.4.20".
( Tested OK on one of my CentOS 7 installs.)


-

Last edited by knudfl; 09-02-2015 at 06:26 AM.
 
1 members found this post helpful.
Old 09-03-2015, 03:59 AM   #3
Mycado
Member
 
Registered: Jun 2006
Location: Paris, France
Distribution: RHEL
Posts: 73

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by knudfl View Post
Not "glibc" : G..LIBCXX.. means "gnu libc++", which we know as libstdc++, a gcc library.

GLIBCXX_3.4.20 is an object from the gcc-4.9.x libstdc++.so.6.0.20

The trick is to find a libstdc++-4.9.x, which is compiled with <=glibc-2.17 :

Found http://rpm.pbone.net/index.php3/stat...86_64.rpm.html
>>> ftp://ftp.pbone.net/mirror/ftp.sourc....99.x86_64.rpm
>> gcc-libstdc++-4.9.1-1.ram0.99.x86_64.rpm

Unpack the package in a new folder :
$ rpm2cpio gcc-libstdc++-4.9.1-1.ram0.99.x86_64.rpm | cpio -idmv
... and copy libstdc++.so.6.0.20 to /usr/lib64/
Next : 1) $ cd /usr/lib64/
2) # rm libstdc++.so.6
3) # ln -s libstdc++.so.6.0.20 libstdc++.so.6
... and you can use applications requiring "GLIBCXX_3.4.20".
( Tested OK on one of my CentOS 7 installs.)
Just tried it, and it's working perfectly.

Thanks a lot for your help :-)
 
Old 04-04-2019, 09:29 AM   #4
avadon
LQ Newbie
 
Registered: Apr 2019
Posts: 1

Rep: Reputation: Disabled
Hello i have same issue and link not exist anymore any other? tyyyy


PS: i am run centos 7
 
Old 04-05-2019, 07:12 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,518

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Post #4, @avadon : Welcome to LQ.

A new link, to gcc49-c++-4.9.3-1.el6.x86_64.rpm, built for EL6, EL7
https://drive.google.com/file/d/1Pwq...ew?usp=sharing
→ Provides /usr/local/gcc493/lib64/libstdc++.so.6.0.20


-

Last edited by knudfl; 04-05-2019 at 07:14 AM.
 
Old 04-05-2019, 07:16 AM   #6
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,109

Rep: Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368
do you think the same lib will work on all platforms (Centos 6/7 Redhar 6/7)?
 
Old 04-05-2019, 08:19 AM   #7
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,518

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #6.

The mentioned "gcc49-c++-4.9.3-1.el6.x86_64.rpm" is used as an extra compiler in CentOS 6, 7 and RHEL 6, 7 .... and in other rpm based OS, e.g. PCLinuxOS 2019.
https://stackoverflow.com/questions/...89915#47189915 → My answer.

`libstdc++´ in /usr/lib*/ : Usually you can use any later libstdc++.so.6.x.xx in any OS.
( If built with the same or an earlier glibc as the system glibc.)

Note : If the system libstdc++.so.6.x.xx is updated, a redo of the linking to the non-system library is required.

-

Last edited by knudfl; 04-05-2019 at 08:21 AM.
 
Old 04-05-2019, 08:38 AM   #8
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,109

Rep: Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368
RHEL6 has 2.6.x and RHEL7 has 3.10.x (kernel version).
It looks strange for me (to use gcc*el6*rpm on RHEL7).
 
Old 04-05-2019, 11:38 AM   #9
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,518

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #8.

I wouldn't know how any gcc version could be related to the kernel.
... Please explain.
 
Old 04-06-2019, 03:21 AM   #10
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 22,109

Rep: Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368Reputation: 7368
hm. actually I think libc is strictly tied to kernel, because the kernel itself handles the hardware and has special drivers. When you develop kernel you will (may) change its internal structures, device drivers. Therefore previous version of libc may or may not work together with the newer kernel. For me it means the libc (which also belongs to a specific version of gcc) is something like a "bridge" between the compiled app and kernel. Using a different kernel/gcc will/may require a different libc too. Although there is something called backward compatibility (but that exists only among different versions of the compiler).
But I guess only, I don't know exactly how it works.
 
Old 04-06-2019, 06:03 AM   #11
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,518

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Re #10.

These extra gcc´s are of course not meant for kernel compiling. Applications only.

No issues ever with my extra gcc´s. Have built those for years.
... And they are publicly available ... and frequently downloaded / used.

Some RPM examples
https://stackoverflow.com/questions/...89915#47189915

And some Ubuntu examples
https://drive.google.com/drive/folde...Jm?usp=sharing

-
 
  


Reply

Tags
glibc, glibcxx, glibcxx_3.4.20, libstdc++, rhel



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to install GLIBCXX_3.4.14 CentOS 6.5 Skillz Linux - Software 2 04-07-2014 11:24 PM
glibcxx_3.4.9 NOT FOUND RHEL mccartjd Linux - Newbie 2 01-24-2012 04:01 AM
[SOLVED] `GLIBCXX_3.4.9' not found infcem Linux - Software 3 06-02-2010 10:20 AM
getting GLIBCXX_3.4.9 on redhat distro dsollen Linux - Newbie 6 09-30-2009 09:44 AM
GLIBCXX_3.4.9 for CentOS? Fnatte Linux - Newbie 0 06-22-2009 10:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:36 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration