Hi Rishi
On Tue, Jul 14, 2009 at 11:08 PM, Rishi Agrawal
<[email protected]>wrote:
> Hello All,
>
> I want to check whether a particular library is installed or not using a
> shell command.
You can simply run this command :
$ ldconfig -v | grep 'your_library_name'
The output will tell whether your library is installed or not. You can use
wildcards to grep the library in case you dont know the exact name of
library.
one tip :
In case you are using Debian based distro and you already installed the
required package which contains the library required for your application to
run using 'apt-get install' command. You can simply find the installed path
of all the files contained in that package by running-
$dpkg -L pkg_name
It will list absolute path of all the files installed by that pkg.
>
>
> I want to write a install script which will first check whether the
> libraries required to compile my code are available on the system or not.
>
> something like #check_library libxml2 (on shell)
> or
> retval = check_library("libxml2"); will do.
>
> --
> Regards,
> Rishi B. Agrawal
> http://www.linkedin.com/in/rishibagrawal
> http://code.google.com/p/fscops/
>
--
Anuj Aggarwal
.''`.
: :Ⓐ : # apt-get install hakuna-matata
`. `'`
`-