Differences
This shows you the differences between two versions of the page.
linux_wiki:library_paths [2018/06/19 16:16] billdozor [Override Search Order] |
linux_wiki:library_paths [2019/05/25 23:50] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Library Paths ====== | ||
- | |||
- | **General Information** | ||
- | |||
- | Configuring and viewing OS library paths. | ||
- | |||
- | **Checklist** | ||
- | * Distro(s): Enterprise Linux 6/7 | ||
- | |||
- | ---- | ||
- | |||
- | ====== Library Config Files ====== | ||
- | |||
- | **Main Config File**: / | ||
- | <code bash> | ||
- | include ld.so.conf.d/ | ||
- | </ | ||
- | |||
- | \\ | ||
- | **Directory of drop in paths**: / | ||
- | \\ | ||
- | Example: / | ||
- | <code bash> | ||
- | / | ||
- | / | ||
- | </ | ||
- | |||
- | \\ | ||
- | Apply Changes: If any changes are made to the above config files, run ldconfig to reload the library cache | ||
- | <code bash> | ||
- | ldconfig -v | ||
- | </ | ||
- | * -v => verbose | ||
- | |||
- | ---- | ||
- | |||
- | ====== 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 " | ||
- | |||
- | ---- | ||