Trouble executing an application that requires libstdc++.so.5

Brian Dessent brian@dessent.net
Sat Nov 4 20:21:00 GMT 2006


Venu Satuluri wrote:

> I am not sure if I understood you completely. The version I have - 3.0.4 -
> is close to the latest one. The application I am trying to run was not
> compiled with a libstdc++ newer than 3.0.4, I think. I don't have the
> source of the package, so recompiling the source is not an option.

libstdc++.so.3.0.4 corresponds to gcc version 3.0.4, released 2002-02-20
and is not anywhere near being "close to the latest one"; it is in fact
very ancient.  The current version is libstdc++.so.6.0.8, corresponding
to gcc-4.1.1.

libstdc++.so.5 corresponds to gcc versions 3.2.x and 3.3.x.  The error
means you are trying to compile a binary compiled by g++ of that vintage
but you are missing the required shared library.  There is absolutely no
way to just try to fake it by fooling it into using an older version of
the library, that is the whole point for having versions to these things
-- they are not forward compatible.

You don't have to recompile the app, but you need to install a
functioning libstdc++.so.5 on your system.  Most distros have this as a
simple package that you can easily install without having to compile
anything.  Look for "libstdc++-5" or similar in your package list.  Or
alternatively, install your distro's gcc-3.3 package.  Failing all of
that, download and build the source to gcc-3.3 yourself, and then insure
that the installed libstdc++.so.5 is either in the system location or in
the LD_RUN_PATH when trying to run the binary.

For more information: <http://gcc.gnu.org/onlinedocs/libstdc++/abi.html>

Brian



More information about the Gcc-help mailing list