Sometimes when you try to launch an application on Linux, typically one you have built yourself, you might get an error like this:

./myapp: error while loading shared libraries: cannot open shared object file: No such file or directory

When this happens, it is up to you to figure out what the problem is. Fortunately, you have a tool called ldd to help.

# using which to get the full path to the executable
ldd $(which sh) => (0x00007fff44fff000) => /lib64/

If any of the shared (dynamic) libraries are not found, you will have to locate them and add them to your LD_LIBRARY_PATH environment variable. something like the following should do the trick:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/missing/library