Linux dynamic library configuration 1. Dynamic library configuration 1. modify the configuration # cat/etc/ld. so. conf include ld. so. conf. d /*. conf # cat/etc/ld. so. conf. d/mysql-x86_64.conf/usr/lib64/mysql # file/etc/ld. so. cache; ldconfig-p prints or updates the content of this file/etc/ld. so. cache: data 2. use the environment variable LD_LIBRARY_PATH to specify the dynamic library search path. Exports $ LD_LIBRARY_PATH:/data/mysql5.5/lib/2. default search paths of the Linux dynamic library are/lib and/usr/lib. After a dynamic library is created, it is generally copied to these two directories. When a dynamic library is required for program execution and the dynamic library is not loaded into the memory, the system will automatically go to the two default search paths to find the corresponding dynamic library file, then load the file to the memory so that the program can use the functions in the dynamic library and other resources of the dynamic library. In Linux, in addition to the default search path, the search path of a dynamic library can be specified in the following three methods. Iii. Command 1. ldconfig/sbin/ldconfig-configure dynamic linker run time bindings DESCRIPTION ldconfig creates the necessary links and cache to the most recent shared libraries found in the direc-tories specified on the command line, in the file/etc/ld. so. conf, and in the trusted directories (/lib and/usr/lib ). the cache is used by the run-time linker, ld. so or ld-linux.so. ldconfig checks the heade R and filenames of the libraries it encounters when determining which versions shold have their links updated. # ldconfig-p; Print the lists of directories and candidate libraries stored in the current cache. # ldconfig-v-n/opt/dell/srvadmin/lib64; Only process directories specified on the command line. don't process the trusted directories (/lib and/usr/lib) nor those specified in/etc/ld. so. Conf. implies-N. 2. ldd-print shared library dependencies DESCRIPTION ldd prints the shared libraries required by each program or shared library specified on the command line. # ldd/opt/dell/srvadmin/sbin/dsm_om_connsvcd; process # ldd-v/opt/dell/srvadmin/sbin/dsm_om_connsvcd Version information: /opt/dell/srvadmin/sbin/dsm_om_connsvcd: libpthread. so.0 (GLIBC_2.2.5) =>/lib64/libpthread. so.0 Libc. so.6 (GLIBC_2.2.5) =>/lib64/libc. so.6 # ldd/usr/lib64/libmenuw. so; library file 3. the readelf command is a utility with many features, allowing you to parse and read ELF objects. Readelf has an interesting purpose. It is used to identify items that can be located in an object. Elffile... are the object files to be examined. 32-bit and 64-bit ELF files are supported, as are archives containing ELF files. # readelf-a/usr/lib64/libmenuw. so # readelf-r/usr/lib64/libmenuw. so