Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
linux_wiki:library_paths [2016/02/05 11:33] billdozor created |
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 17: | Line 17: | ||
</ | </ | ||
+ | \\ | ||
**Directory of drop in paths**: / | **Directory of drop in paths**: / | ||
+ | \\ | ||
Example: / | Example: / | ||
<code bash> | <code bash> | ||
Line 25: | Line 26: | ||
</ | </ | ||
+ | \\ | ||
Apply Changes: If any changes are made to the above config files, run ldconfig to reload the library cache | Apply Changes: If any changes are made to the above config files, run ldconfig to reload the library cache | ||
<code bash> | <code bash> | ||
Line 30: | Line 32: | ||
</ | </ | ||
* -v => verbose | * -v => verbose | ||
+ | |||
+ | \\ | ||
+ | Print the Cache Contents: To see what is currently in the library cache< | ||
---- | ---- | ||
====== Library Search Order ====== | ====== Library Search Order ====== | ||
+ | |||
+ | Shared libraries needed by programs are searched for in this order: | ||
+ | * Environment variable " | ||
+ | * (ELF binaries only) => Directories specified within the binary. (DT_RUNPATH) | ||
+ | * From cache file (/ | ||
+ | * 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 " | ||
+ | |||
+ | \\ | ||
+ | Example: Ensure that /usr/lib64 is ahead of / | ||
+ | <code bash> | ||
+ | vim / | ||
+ | |||
+ | LD_LIBRARY_PATH=/ | ||
+ | </ | ||
+ | * Including the " | ||
---- | ---- | ||