Sometimes it’s preferred to install libraries into non-default locations, such as /usr/local/,
but how to let the system know where to find them?
ldconfig can be used to change the lib path,
Ex. To have the system be able to find libraries under /usr/local/lib for myapp
vi /etc/ld.so.conf.d/myapp.conf
/usr/local/lib
#ldconfig
To check result
#ldconfig -v
# ldconfig -l /path/to/lib/missing.lib.so
Great articles about shared libraries.
http://www.cyberciti.biz/faq/linux-setting-changing-library-path/
http://www.cyberciti.biz/tips/linux-shared-library-management.html