Your library is a dynamic library.
You need to tell the operating system where it can locate it at runtime.
To do so,
we will need to do those easy steps:
-
Find where the library is placed if you don’t know it.
sudo find / -name the_name_of_the_file.so -
Check for the existence of the dynamic library path environment variable(
LD_LIBRARY_PATH)echo $LD_LIBRARY_PATHIf there is nothing to be displayed, add a default path value (or not if you wish to)
LD_LIBRARY_PATH=/usr/local/lib -
We add the desired path, export it and try the application.
Note that the path should be the directory where the
path.so.somethingis. So ifpath.so.somethingis in/my_library/path.so.something, it should be:LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/my_library/ export LD_LIBRARY_PATH ./my_app
Reference to source