By default, libraries are located in /usr/local/lib, /usr/local/lib64, /usr/lib and /usr/lib64; system startup libraries are in /lib and /lib64. Programmers can, however, install libraries in custom locations. The library path can be defined in /etc/ld.
How do you see if a library is installed Linux?
If it is installed, you will get a line for each version available. Replace libjpeg by any library you want, and you have a generic, distro-independent* way of checking for library availability. If for some reason the path to ldconfig is not set, you can try to invoke it using its full path, usually /sbin/ldconfig .
Where are libraries in Ubuntu?
In general, things built locally for others on the machine to user are put into the /usr/local tree. The header file should go into /usr/local/include. The compiled library should go into /usr/local/lib.