The role of the Ldconfig command
Source: Time: 2013-09-04 20:32:59 read:22542
share to: 0
[Introduction] ldconfig is a dynamic link Library Management command in order for the dynamic link library to be shared by the system, it is also necessary to run the management command of the dynamic link Library--ldconfigldconfig command, mainly in the default search directory (Lib and usr Lib) As well as the dynamic library configuration file, etc ld so conf are listed in the
Ldconfig is a dynamic link Library management command
In order for the dynamic link library to be shared with the system, it is also necessary to run the management commands of the dynamic link library--ldconfig
The purpose of the Ldconfig command is to search for a shareable dynamic-link library (in the form of a previous introduction, lib*.so*), mainly in the default search directory (/lib and/usr/lib) and in the directory listed in the dynamic library configuration file/etc/ld.so.conf. This creates the connection and cache files required by the dynamic loader (ld.so). The cache file defaults to/etc/ld.so.cache, which holds the list of queued dynamic-link library names.
Ldconfig usually runs at system startup, and when a user installs a new dynamic-link library, they need to run the 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 the options available are described below:
(1)-V or--verbose: With this option, Ldconfig displays the directory being scanned and the dynamic link library that was searched, and the name of the connection it created.
(2)-N: With this option, Ldconfig scans only the directories specified by the command line, does not scan the default directory (/lib,/usr/lib), and does not scan directories listed in the configuration file/etc/ld.so.conf.
(3)-N: This option indicates that Ldconfig does not rebuild the cache file (/etc/ld.so.cache). If the-X option is not used, the connection to the file is updated Ldconfig as usual.
(4)-x: This option indicates that Ldconfig does not update the file's connection. If the-n option is not used, the cache 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 default is/etc/ld.so.cache, which holds a list of ordered shareable dynamic link libraries.
(7)-R root: This option changes the root directory of the application to be root (called the chroot function). When this option is selected, the default configuration file for the system is/etc/ld.so.conf, and the actual corresponding root/etc/ld.so.conf.-r/usr /zzz, when you open the profile/etc/ld.so.conf, the/usr/zzz/etc/ld.so.conf file is actually opened. With this option, you can greatly increase the flexibility of dynamic link library management.
(8)-L: Typically, Ldconfig will automatically establish a connection to a dynamic-link library when it searches for a dynamic-link library. When this option is selected, the expert mode is entered, and the connection needs to be set manually. 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 cache file.
(+)-C format or--format=format: This option specifies the format in which the cache file is used, in total three types: LD (old format), new (newer format), and Compat (the default format).
(one)-V: This option prints out the version information for Ldconfig and then exits.
(12)-? or--help or--usage: These three options work the same, letting Ldconfig print out their help information and then exit.
The shared library mechanism under Linux uses a caching-like mechanism to store the library information in/etc/ld.so.cache.
When the program is connected, look it up from inside the file, and then go to the ld.so.conf path to find it in detail.
That's why you modified ld.so.conf to run Ldconfig again.
Add a little, ldconfig in/sbin.
The role of the Ldconfig command