linux_wiki:library_paths

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux_wiki:library_paths [2016/02/05 11:39]
billdozor [Library Search Order]
linux_wiki:library_paths [2019/05/25 23:50] (current)
Line 6: Line 6:
  
 **Checklist** **Checklist**
-  * Distro: Enterprise Linux 6/7+  * Distro(s): Enterprise Linux 6/7
  
 ---- ----
Line 32: Line 32:
 </code> </code>
   * -v => verbose   * -v => verbose
 +
 +\\
 +Print the Cache Contents: To see what is currently in the library cache<code bash>ldconfig --print-cache</code>
  
 ---- ----
Line 41: Line 44:
   * (ELF binaries only) => Directories specified within the binary. (DT_RUNPATH)   * (ELF binaries only) => Directories specified within the binary. (DT_RUNPATH)
   * From cache file (/etc/ld.so.cache) => created via ldconfig   * From cache file (/etc/ld.so.cache) => created via ldconfig
-  * In default system library paths (/lib, /usr/lib)+  * In default system library paths (/lib, /lib64, /usr/lib) 
 + 
 +====== Override Search 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" 
 +<code bash> 
 +vim /home/robert/.bashrc 
 + 
 +LD_LIBRARY_PATH=/usr/lib64:${LD_LIBRARY_PATH} 
 +</code> 
 +  * Including the "${LD_LIBRARY_PATH}" as a second entry ensures that nothing is completely over written if the variable has been set elsewhere
  
 ---- ----
  
  • linux_wiki/library_paths.1454690378.txt.gz
  • Last modified: 2019/05/25 23:50
  • (external edit)