views:

78

answers:

4

My client had some developer write a small c++ command-line app to run on their Linux servers. On one of the servers (running Fedora 11), when I execute the app I get the following error:

error while loading shared libraries: libstdc++.so.5: cannot open shared object file: No such file or directory

Obviously the first thing I did was

yum install libstdc++

But I get

Package libstdc++-4.4.1-2.fc11.x86_64 already installed and latest version

So the library already exists and is up-to-date. Usually to me these errors indicate a missing library. So where should I look next?

A: 

Have you checked that the package does install libstdc++.so.5 and not some other version? That's your most likely problem.

Timo Geusch
-1 Not an informative answer.
Ken Bloom
+1  A: 

libstdc++.so.5 is a very old version of the standard c++ library.

Do a yum search libstdc++ , you'll have to install one of the compat-libstdc++ packages.

nos
+3  A: 

libstdc++-4.4.1-2.fc11.x86_64 installs libstdc++.so.6. You need the compat-libstdc++-33-3.2.3-66.x86_64 package to get libstdc++.so.5. (Do not symlink! libstdc++.so.5 and libstdc++.so.6 are incompatible.)

Ken Bloom
+1  A: 

rpm hence the repo knows about shared library names and what provides them. So

yum install 'libstdc++.so.5'

wiil install whatever is necessary if the repo has it.

In your case it would fetch compat-libstdc++-33-3.2.3-66.i586.rpm and its 32-bit deps if you don't have them already because the binary you are trying to run is apparently 32-bit

anon