Turn from: http://hi.baidu.com/linuxlife/item/94a6c096a1e4184af0421569
Ldconfig is a dynamic link Library management command
In order for the dynamic link library to be shared by the system, you also need to run the management commands for the dynamic link library--ldconfig
The purpose of the Ldconfig command is to search for a shareable dynamic-link library (formatted as described above, lib*.so*) in the default search directory (/lib and/usr/lib) and in directories listed in the dynamic library configuration file/etc/ld.so.conf. It then creates the required connection and cache files for the dynamic loader (ld.so). The cached file defaults to/etc/ld.so.cache, which holds the list of dynamically linked library names that have been sorted out.
Ldconfig usually runs when the system starts, and when a user installs a new dynamic link library, it needs to run this command manually.
The Ldconfig command line usage is as follows:
Ldconfig [-v|--verbose] [-n] [-n] [-X] [-F-CONF] [-C CACHE] [-R ROOT] [-l] [-p|--print-cache] [-C FORMAT] [--format=format ] [-v] [-|--help|--usage] path ...
Ldconfig available options are described below:
(1)-V or--verbose: When this option is used, Ldconfig displays the directory being scanned and the dynamic link library that was searched, as well as the name of the connection it created.
(2)-N: When this option is used, Ldconfig scans only the directory specified by the command line, does not scan the default directory (/lib,/usr/lib), nor does it scan the directories listed in the configuration file/etc/ld.so.conf.
(3)-N: This option indicates that Ldconfig does not rebuild the cached file (/etc/ld.so.cache). If you do not use the-X option, ldconfig updates the connection to the file as usual.
(4)-x: This option indicates that Ldconfig does not update the connection to the file. If the-n option is not used, the cached file is updated normally.
(5)-F CONF: This option specifies that the configuration file for the dynamic link library is CONF and the system defaults to/etc/ld.so.conf.
(6)-C cache: This option specifies that the generated cache file is cached, and the system defaults to/etc/ld.so.cache, which holds a list of available dynamically linked libraries that have been sorted out.
(7)-R root: This option changes the root of the application to root (which is implemented by calling the Chroot function). When you select this item, the default configuration file for the system is/etc/ld.so.conf and the actual corresponding is root/etc/ld.so.conf.-r/usr /zzz, when you open the configuration file/etc/ld.so.conf, the/usr/zzz/etc/ld.so.conf file is actually open. With this option, you can greatly increase the flexibility of dynamic link library management.
(8)-L: Typically, a dynamic-link library connection is automatically established when Ldconfig searches for a dynamic-link library. When you select this item, you enter expert mode and you need to manually set up the connection. The general user does not use this item.
(9)-P or--print-cache: This option instructs Ldconfig to print out the names of all shared libraries that are saved by the current cached file.
(a)-C format or--format=format: This option specifies the format to use for caching files, there are three types: LD (old format), new (format), and Compat (compatible format, which is the default format).
(one)-V: This option prints out the Ldconfig version information and then exits.
(12)-or--help or--usage: These three options function the same, are to let ldconfig print out its help information, and then exit.