loading shared libraries: libstdc++.so.6
am 03.01.2008 18:40:24 von tclin1998
Hi:
I got an error message when running a program:
>./router
../router: error while loading shared libraries: libstdc++.so.6: cannot
open shared object file: No such file or directory
Does anyone know the cause?
I don't have libstdc++.so.6 in /usr/lib but the program is static
linked.
> ldd router
not a dynamic executable
Thanks
-Todd
Re: loading shared libraries: libstdc++.so.6
am 03.01.2008 20:10:55 von Icarus Sparry
On Thu, 03 Jan 2008 09:40:24 -0800, tclin1998 wrote:
> Hi:
>
> I got an error message when running a program:
>
>>./router
> ./router: error while loading shared libraries: libstdc++.so.6: cannot
> open shared object file: No such file or directory
>
> Does anyone know the cause?
> I don't have libstdc++.so.6 in /usr/lib but the program is static
> linked.
>
>> ldd router
> not a dynamic executable
>
> Thanks
>
> -Todd
The fact that ldd says it is not a dynamic executable does not mean as
much as you seem to think.
1) The way that ldd works means that you have to be able to execute
"router" on the machine that is running ldd. If you are cross compiling
this is often not the case.
2) Even if the "router" program is statically linked, it does not mean
that it cannot load additional libraries whilst it is running.
"readelf -d" is often a better tool than ldd to see what is required at
startup time.
The "elfutils" version of readelf is also good.
I suggest you install the library that it is asking for.