How to Install libraries by hand in Linux and Unix

Installing a library from sources in Linux and Unix is the same as installing a normal app from sources. You download and extract the archive, cd to the directory, ./configure, make and sudo make install.

The right place for installing a library is /usr/share/lib.

When you compile a library from sources (with ./configure, make and sudo make install) , it will be installed by default in the right place: /usr/share/lib.

To find out what libraries is a program using, use one of the following commands:

$ ldd path/to/the/program.

$ lsof -P -T -p PID #PID is the process id of the running process/aplication

I have installed the libevent library here.

Liked it? Take a second to support Geekster on Patreon!
Tagged with: , , ,
Posted in The Linux and Unix Articles!

Leave a Reply

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

*

Support LinuxG via Patreon
Support LinuxG.net on Patreon!
Subscribe

  

Subscribe to get the latest Linux news and how to guides directly on your e-mail!