Ld. so. conf. d configuration file
Ld. so. conf. d is used to load dynamic library files in Linux:
In/etc, we will find the following three files
Ld. so. conf. d
Ld. so. conf
Ld. so. cache
After viewing ld. so. conf, you can see that it contains all the configuration files in ld. so. conf. d.
Include ld. so. conf. d/*. conf
Check the content in ld. so. conf. d. You can see many configuration files.
[Root @ bkjia mcrypt-2.6.8] # ll/etc/ld. so. conf. d/
Total 16
-Rw-r --. 1 root 17 Feb 9 2012 atlas-x86_64.conf
-R --. 1 root 324 Jan 30 2013 kernel-2.6.32-358.el6.x86_64.conf
-Rw-r --. 1 root 17 Dec 5 2012 mysql-x86_64.conf
-Rw-r --. 1 root 22 Jul 18 2011 qt-x86_64.conf
You can see the following configuration in view of the Configuration:
[Root @ bkjia mcrypt-2.6.8] # cat/etc/ld. so. conf. d/qt-x86_64.conf
/Usr/lib64/qt-3.3/lib
I added a configuration file.
12 [root @ bkjia mcrypt-2.6.8] # vi/etc/ld. so. conf. d/userlocal. conf
/Usr/local/lib
Check again to find the dynamic library under this directory.
[Root @ bkjia mcrypt-2.6.8] # ldconfig-p | grep libmcrypt
Libmcrypt. so.4 (libc6, x86-64) =>/usr/local/lib/libmcrypt. so.4
Libmcrypt. so (libc6, x86-64) =>/usr/local/lib/libmcrypt. so
However, I did not succeed in the actual operation, but added the path to/etc/ld. so. conf to take effect.
The corresponding information is cached in ld. so. cache.
You can view it through string ld. so. cache.
If the software cannot run, run the ldd command to check whether the program cannot be started due to the missing dynamic library.
[Root @ bkjia mcrypt-2.6.8] # ldd/sf_web/mysql/bin/mysql
Linux-vdso.so.1 => (0x00007fff3b5fc000)
Libpthread. so.0 =>/lib64/libpthread. so.0 (0x0000003ff8200000)
Librt. so.1 =>/lib64/librt. so.1 (0x0000003ff8600000)
Libdl. so.2 =>/lib64/libdl. so.2 (0x0000003ff7e00000)
Libncurses. so.5 =>/lib64/libncurses. so.5 (0x00007f1380a06000)
Libstdc ++. so.6 =>/usr/lib64/libstdc ++. so.6 (0x0000003ffbe00000)
Libm. so.6 =>/lib64/libm. so.6 (0x0000003ff8e00000)
Libgcc_s.so.1 =>/lib64/libgcc_s.so.1 (0x0000003ffca00000)
Libc. so.6 =>/lib64/libc. so.6 (0x0000003ff7a00000)
/Lib64/ld-linux-x86-64.so.2 (0x0000003ff7600000)
Libtinfo. so.5 =>/lib64/libtinfo. so.5 (0x0000003ff9e00000)
This article permanently updates the link address: