• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 17047
  • Last Modified:

libstdc++.so.5: cannot open shared object file: No such file or directory

Over the past 2 years I have had RHEL ES 3 as my operating system, and today on a leased server I got RHEL 4 instead. I'm getting the following error...
libstdc++.so.5: cannot open shared object file: No such file or directory.

I tried to locate this file but it's not on the server. The only thing that's there is
/usr/lib/libstdc++.so.6.0.3
/usr/lib/libstdc++.so.6
/usr/lib/gcc/i386-redhat-linux/3.4.3/libstdc++.so.

Is there a way to install a libstdc++.so.5 file without messing up the compiler I currently have that came with gcc 3.4.5 ? If so, what do I need to get and where can I get it ? Also, is it a big deal to install ?

Thanks,
Fireman54
0
Fireman54
Asked:
Fireman54
1 Solution
 
sheetbirdCommented:
in the past I've had success in other cases with something like:

ln -s  /usr/lib/libstdc++.so.6  /usr/lib/libstdc++.so.5

However that is kind of a hack job, you could also find the older version rpm and try to install it (without removing the current libstdc++ rpm) which is the right way.  If it gives you conflicts you can just unpack it somewhere and then copy libstdc++.so.5 to /usr/lib.
0
 
ravenplCommented:
> ln -s  /usr/lib/libstdc++.so.6  /usr/lib/libstdc++.so.5
don't - it's know to be incompatible
instead, download and install compat-libstdc++-33 package
if You online try: up2date compat-libstdc++-33
0
 
Duncan RoeSoftware DeveloperCommented:
You can simply copy  /usr/lib/libstdc++.so.5.0.6 (or whatever version it is) off a RHEL ES 3 system. Then rerun ldconfig.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
leisnerCommented:
Or if you're not root (and don't want to take a change messing up the system --

1) copy libstdc++.so.5 to someplace safe (like /tmp/lib)
do
LD_LIBRARY_PATH=/tmp/lib:$LD_LIBRARYPATH application

see if it works first...then you might want to put it in a privaleged place
(or in ~/lib and just live with LD_LIBRARY_PATH).
0
 
Duncan RoeSoftware DeveloperCommented:
I've had 3 versions of libstdc++.so co-existing in my /usr/lib for years - so I think the chances of messing up your system are minimal.
But if you can't become root then leisner has an idea. Be sure to copy the one with the longest name, then make libstdc++.so.5 a symlink to it.
0
 
Fireman54Author Commented:
I ran...   rpm -ivh compat-gcc-32-3.2.3-47.3.src.rpm and it appeared to install but libstdc++.so.5 is nowhere on the hardrive.

Please advise,
Fireman54
0
 
Duncan RoeSoftware DeveloperCommented:
That is a source rpm. You would have to build it. So far you have installed the source ready for building. You might have to use rpmbuild or maybe rpm has an option to build nowadays - I don't know as I avoid rpm when I can. You already have my advice as to what I would be doing in your situation.
0
 
Fireman54Author Commented:
Duncan, aren't you saying to install it in your earlier post? I do have root access. Should I not use a source rpm?

It's not clear to me what you said about "copy the one with the longest name, then make libstdc++.so.5 a symlink to it." The longest name?

Thanks,
0
 
Fireman54Author Commented:
Duncan,

Also, when I ran    rpm -ivh compat-gcc-32-3.2.3-47.3.src.rpm   it ran real fast gas guage, but it never created a directory for it, typically like a tar would.
0
 
Fireman54Author Commented:
Ravenpl,

I ran "up2date -i compat-libstdc++-33" and it worked perfectly.

Thank you,
Fireman54
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now