Linux command [ldconfig] LPIC learning memo

LPIC Learning Memo [ldconfig]

A command for updating an existing library or placing a new library under a new folder for updating.

Benefits of creating a library of program sources When there is a description that executes the same operation (function) multiple times in the source. The following merits can be obtained by issuing the duplicated functions as a single function. -By putting the same part in the program outside, the redundancy in the source can be removed. (Improves visibility) -By making it a single program, the man-hours for testing the caller can be reduced. -Repair mistakes can be reduced by fixing only one part at the time of repair and not having to modify all the programs that call the function.

Library type -Static library is included in the executable file -Dynamic library The library is taken into memory and used when it is executed.

When executing the program, the link / loader that reads where the shared library is located searches the cache for the location, but when using the ldconfig command, it refers to the /etc/ file and creates an appropriate symbolic file. And it will be listed in the cache. Therefore, speedup can be expected when using the shared library. (Advantages of using ldconfig)

However, if you add to a location other than the default or move the path, the symbolic file will not be changed automatically by recognizing the change, so update the /etc/ file. Then you need to run ldconfig again.

Since ldconfig determines which version to update the link from the file name and header part, it is necessary to control by option.

option -v Detailed display mode. Show current version number. Check each directory and display the contents each time you generate a link

-p View a list of directories stored in the current cache and library suggestions.

-n Process only directories specified on the command line. Even if it is specified in /etc/, the directory where the common library is placed by default, it is ignored.

-N Do not reconfigure the cache. Link updated.

-X Do not update the link. Reconfigure only the cache.

-f conf Use the string conf instead of /etc/

-C cache Use the string cache instead of /etc/

-r root Execute the string root as the current directory.

-l Manually link each library. (Because mistakes are likely to occur before you get used to it, you should not use it until you get used to it.)

Recommended Posts

Linux command [ldconfig] LPIC learning memo
LPIC201 learning memo
Linux # Command Memo 1
Linux tar xz command memo
[Learning memo] Django command summary
Linux command # 4
Linux command # 3
Linux command # 5
command memo
Command memo
Linux command (basic in basic) personal memo
Linux command list
LPIC304 virtualization memo
linux at command
[Linux] Search command
Linux x memo
Django Learning Memo
Linux command <Basic 2>
LPIC101 study memo
linux (ubuntu) memo
scp command memo
Linux [directory command]
who command memo
Linux server command
Linux command [read]
Linux Command Summary
[Basic] linux command
Linux [shell command]
[Linux] Command / Knowledge
My linux command
Linux command <Basic 1>
[Memo] Machine learning
Linux command collection
Linux mkdir command
Linux command basics
[Linux] Git command
Linux (command memory)
Python module (Python learning memo ④)
vi (vim) command memo
Linux command cheat sheet
Linux standard textbook memo 1
Linux command (sequential update)
Linux standard textbook memo 3
[For memo] Linux Part 2
Linux command [File operation]
Machine learning course memo
[Linux] Basic command summary
Basic Python command memo
Linux command for self-collection
linux command error collection 1
Linux command line shortcut
Linux learning record ① Plan
LPIC Lv1-101 (Ver5.0) memo
NTP configuration memo on Linux
linux sar command CPU usage
Python exception handling (Python learning memo ⑥)
[Linux] tar.gz compression / decompression command
What is Linux? [Command list]
Linux standard textbook memo 1 part 2
virtualenv Basic command usage memo
Linux fastest learning with AWS