Manage Libraries With ldconfig Command In Linux

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/manage-libraries-ldconfig-command-linux/
PINTEREST
PINTEREST
INSTAGRAM

Linux applications, tools, services uses libraries to get necceseary functionalities. Libraries provides a lot of functionality to the related applications, tools and services. One library can be used by different applications. This is called dynamic library using or loading.

Shared Libraries

Shared libraries reside in /lib , /lib64 and /usr/lib . Each library is put into related directories like apt , gcc or similar. Dynamic libraries generally have extension .so but there are also some version related numbering.

For example libvte.so.9 is a dynamic library for vte which version is 9 .

Shared Libraries
Shared Libraries

Add Path To ldconfig

Some times the required libraries for the executeable is not located in the standard paths. The default library path is hold in LD_LIBRARY_PATH environments variable. We should add new path to this variable. In the example we assume that the new library path is /foo

Add Path To ldconfig
Add Path To ldconfig

Rebuild Cache

ldconfig is located at /etc/ld.so.conf which content is like below. We will add the library path with include command. The final content will be like below.

Now we will run the ldconfig -p command to read configuration file and rebuild the cache.

RSS
EMAIL
FACEBOOK
FACEBOOK
GOOGLE
GOOGLE
https://www.poftut.com/manage-libraries-ldconfig-command-linux/
PINTEREST
PINTEREST
INSTAGRAM
LEARN MORE  How To Set Get and Change Bash Environment Variable?

Leave a Reply

Your email address will not be published.