Linux - NewbieThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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)
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.)
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.)
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,518
Rep:
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.