In linux, how do I check if a library is installed or not? (from the command line of course).
In my specific case now, I want to check whether libjpeg is installed.
|
|
You can check with the package manager of your distribution (aptitude, yum, ...) but as you did not give your distribution I can't give you the right command. Another way can be to run
There is many other way to check that, if you give us more context (why you need to check if libjpeg is installed) we could give you the best solution for your specific case. |
|||
|
|
|
I'm use whereis utility. l1feh4ck3r@xxx:~$ whereis libjpeg |
||||
|
|
|
For deb-based distribution you can do
Or if you know the filename only, use
The filename is usually libsomething.so[.version]. |
|||||||||||
|
|
This is done by configuration tools on linux all the time. Look at this Tutorial about autoconf and KDevelop. Other tricks would use commands like |
|||
|
|
|
On Redhat based systems, one can use pkg-config to verify if a library is installed or not. Many rpm binaries actually make the same checks before proceeding with installation, so we can reasonably rely on its veracity.
|
|||
|
|