Manage Libraries With ldconfig Command In Linux – POFTUT

Manage Libraries With ldconfig Command In Linux

Linux applications, tools, services uses libraries to get necessary 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 executable 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.

LEARN MORE  How To Register and Unregister Windows DLL Files with Regsrv32 Command

Leave a Reply

Your email address will not be published. Required fields are marked *

Enjoy this blog? Please spread the word :)