I am trying to run an application (a.out
), very small application contains only one print statement) on Linux OS custom board which is not having the shared libs in /lib
or /usr/lib
.
So I am exporting the shared libs path using LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/media/opensourcelib/toolchainLib/ramfslib
I made sure, shared libraries are in this path /media/opensourcelib/toolchainLib/ramfslib
Still, after this, when I execute a.out
I get the error
/bin/sh: ./../usr/lib/a.out: not found
If I copy my shared libs to /lib
, the application works fine.
But I need to make it work without copying the shared libs. Please help me, what could be the issue in exporting LD_LIBRARY_PATH
.
I would do the following things:
ls /media/opensourcelib/toolchainLib/ramfslib
, before any other thing, and check that the library is there.ldconfig
. Maybe for your libmylib.so.1.5.8
you will find the links libmylib.so.1.5
, libmylib.so.1
and libmylib.so
.ldd a.out
.strace
installed into the system (if not, I recommend to compile it for your board and copy it to your board), try to launch it exporting previously LD_LIBRARY_PATH
and verify the paths are tried to read (and a many other things).I hope it could be helpful.