General Information
Configuring and viewing OS library paths.
Checklist
Main Config File: /etc/ld.so.conf includes a directory
include ld.so.conf.d/*.conf
Directory of drop in paths: /etc/ld.so.conf.d/
Example: /etc/ld.so.conf.d/mylibraries.conf
/data/lib/application1/ /data/lib/application2/
Apply Changes: If any changes are made to the above config files, run ldconfig to reload the library cache
ldconfig -v
Print the Cache Contents: To see what is currently in the library cache
ldconfig --print-cache
Shared libraries needed by programs are searched for in this order:
To get a path specified in front of another, define the environmental variable “LD_LIBRARY_PATH” in a configuration file (per user or system wide).
Example: Ensure that /usr/lib64 is ahead of /usr/local/lib for user “robert”
vim /home/robert/.bashrc LD_LIBRARY_PATH=/usr/lib64:${LD_LIBRARY_PATH}