[dywang@dyw219 make1]$ ldconfig --help
Usage: ldconfig [OPTION...]
Configure Dynamic Linker Run Time Bindings.
-c, --format=FORMAT Format to use: new, old or compat (default)
-C CACHE Use CACHE as cache file
-f CONF Use CONF as configuration file
-i, --ignore-aux-cache Ignore auxiliary cache file
-l Manually link individual libraries.
-n Only process directories specified on the command
line. Don't build cache.
-N Don't build cache
-p, --print-cache Print cache
-r ROOT Change to and use ROOT as root directory
-v, --verbose Generate verbose messages
-X Don't generate links
-?, --help Give this help list
--usage Give a short usage message
-V, --version Print program version
Mandatory or optional arguments to long options are also mandatory or optional
for any corresponding short options.
For bug reporting instructions, please see:
<http://www.gnu.org/software/libc/bugs.html>.
-f conf :conf 預設為 /etc/ld.so.conf -C cache:cache 預設為 /etc/ld.so.cache -p :列出目前在 cache 內的資料
[dywang@dyw219 make1]$ cat /etc/ld.so.conf include ld.so.conf.d/*.conf [dywang@dyw219 make1]$ ls /etc/ld.so.conf.d/ atlas-x86_64.conf kernel-ml-4.4.5-1.el6.elrepo.x86_64.conf compat-mysql51-x86_64.conf kernel-ml-4.8.12-1.el6.elrepo.x86_64.conf ctapi-x86_64.conf mysql-x86_64.conf kernel-2.6.32-696.el6.x86_64.conf qt-x86_64.conf
[dywang@dyw219 make1]$ su -
[root@dyw219 ~]# echo '/usr/lib64/xorg/modules/' >> /etc/ld.so.conf.d/xorg.conf [root@dyw219 ~]# cat /etc/ld.so.conf.d/xorg.conf /usr/lib64/xorg/modules/
[root@dyw219 ~]# ldconfig -p | grep xorg
[root@dyw219 ~]# ldconfig
[root@dyw219 ~]# ldconfig -p | grep xorg libwfb.so (libc6,x86-64) => /usr/lib64/xorg/modules/libwfb.so libvgahw.so (libc6,x86-64) => /usr/lib64/xorg/modules/libvgahw.so libvbe.so (libc6,x86-64) => /usr/lib64/xorg/modules/libvbe.so libshadowfb.so (libc6,x86-64) => /usr/lib64/xorg/modules/libshadowfb.so libshadow.so (libc6,x86-64) => /usr/lib64/xorg/modules/libshadow.so libint10.so (libc6,x86-64) => /usr/lib64/xorg/modules/libint10.so libglamoregl.so (libc6,x86-64) => /usr/lib64/xorg/modules/libglamoregl.so libfbdevhw.so (libc6,x86-64) => /usr/lib64/xorg/modules/libfbdevhw.so libfb.so (libc6,x86-64) => /usr/lib64/xorg/modules/libfb.so libexa.so (libc6,x86-64) => /usr/lib64/xorg/modules/libexa.so
[root@dyw219 ~]# rm /etc/ld.so.conf.d/xorg.conf [root@dyw219 ~]# ldconfig [root@dyw219 ~]# ldconfig -p | grep xorg
[root@dyw219 ~]# ll /etc/ld.so.cache -rw-r--r--. 1 root root 98744 Apr 27 20:37 /etc/ld.so.cache