On Wed, Dec 14, 2005 at 12:03:50PM -0600, Matt Dittbenner wrote:
> Is there a good, reliable way to check a library version in linux? 
> Something that works like using ldd to find the libraries a binary is 
> linked with. I am working on a machine and I want to verify that the 
> libc and the ld-linux versions are what they say they are.
> 
> lrwxrwxrwx    1 root     root           13 Apr  7  2005 /lib/libc.so.6 
> -> libc-2.2.4.so*
> lrwxrwxrwx    1 root     root           11 Apr  7  2005 
> /lib/ld-linux.so.2 -> ld-2.2.4.so*
> 
> For some reason this looks funny to me, but I'm not extremely familiar 
> with these libraries...I just know that everything needs em! I 
> understand that these are symbolic links to the real libs, but the libc 
> doesn't look like the correct version. I am getting an error when trying 
> to use a PHP module that says it "Cannot load shared object file", and 
> these are the only 2 libs it's linked with. The module is the PHP module 
> DIO.

Your distro's package management tools.  So on my debian system I can
find out what package any file belongs to by `dpkg -S libc.so.6`,
or `dpkg -S libc-2.3.2.so`.
They both show they are from "libc6" package.

The packages have MD5's on all files, in debian thats at:
/var/lib/dpkg/info/pkgname.md5sums
So I could check it against this for changes using md5sum utility.

I recall rpm system's having similar features.

I have no clue as to why a so.6 points to a 2.2.4 thing, you'd think it
would have a .6 in it somewhere, oh well..

About the "Cannot load shared object file", did you compile this stuff
yourself or is it installed by your distro packages?  What distro do
you have?  Need to run ldconfig?  Add a local/lib dir in /etc/ld.so.conf?

Some programs use dynamic linking(man dlopen),
which will not show using ldd.  You can look at what some of them load
into memory as /proc/PID#/maps.