Five, function library management
1. function Library Classification
static function libraries: library files typically end with an "*.a" extension. This library is directly integrated into the program when it is called by the program .
Advantage: When the program executes, you do not need to call external data, you can directly execute
Cons: Because all the content is integrated into the program, so the compilation of the generated files will be more difficult to upgrade, you need to recompile the entire program
2.Dynamic Function Library: The function library file usually ends with the "*.so" extension. When the function library is called by the program, it is not directly integrated into the program, and when the program needs to use function library function, it is going to read the function library. Only the point of the function library is saved in the program
2. function Library Management
1) installation function library
[[email protected] ~]# ldd-v executable file name
option: -v displays detailed version information
The function libraries are called in the query system, and the commands are as follows
[[email protected] ~]# ldd–v can execute file name
Options:
-V Displays detailed version information
check the LS command to downgrade those libraries.
[Email protected] ~]# Ldd/bin/ls
Linux-vdso.so.1=> (0x00007fff60bff000)
Libselinux.so.1 =>/lib64/libselinux.so.1 (0x0000003a06a00000)
Librt.so.1 =>/lib64/librt.so.1 (0x0000003a06200000)
Libcap.so.2 =>/lib64/libcap.so.2 (0x0000003a07a00000)
Libacl.so.1 =>/lib64/libacl.so.1 (0x0000003a08a00000)
Libc.so.6 =>/lib64/libc.so.6 (0x0000003a05600000)
Libdl.so.2 =>/lib64/libdl.so.2 (0x0000003a05200000)
/lib64/ld-linux-x86-64.so.2 (0x0000003a04e00000)
libpthread.so.0 =>/lib64/libpthread.so.0 (0x0000003a05a00000)
libattr.so.1 =>/lib64/libattr.so.1 (0x0000003a08200000)
If you install a new function library, how to make the system recognized, in fact, the normal installation of the software does not need to manually adjust the function library, they will be installed normally, but not properly installed, it is very simple to install it, just need to put the library into the designated location, usually placed in the "/usr/lib " or"/lib", and then writes the directory where the library is located to the"/etc/ld.so.conf " file. Note that the directory name where the library is located is written to a file name that is not a function library. For example:
[[email protected] ~]# CP *.so/usr/lib # Copy the library into the /usr/lib directory
[[email protected] ~]# vi/etc/ld.so.conf # Modify function library configuration file
Include ld.so.conf.d/*.conf
/usr/lib # write to the directory where the library is located (in fact the/usr/lib directory is already recognized by default)
then use the Ldconfig command to re-read the/etc/ld.so.conf file, read the library into the cache, the command is as follows:
[Email protected]~]# ldconfig # reads the library into the cache from the/etc/ld.so.conf
[[Email protected]~]# ldconfig–p # lists all recognized libraries in the system cache
Add:
Date # View system time
Date–s 20150506 # Set Date
Date–s 09:30:00 # Set time
Du–sh directory name # Statistics Directory size
-S and
-H Customary unit
This article from "Wu Dick" blog, declined reprint!
linux-Software Installation (iii)