As you can see in /etc/issue
, you're using CentOS 5.3. (It says Red Hat because CentOS is based upon the RH sources, and some software checks /etc/issue
to identify the distro in use; thus, they'd fail if this was changed to CentOS).
The 4.1.2-4
in /proc/version
refers to the version of the gcc
C compiler used to build the kernel.
The version info in not explicitly stored in an ELF file. What you have in there is the name of the library, the soname
, which includes the major version.
The full version is usually stored as a part of the library file name.
If you have library, say libtest.so
, then you usually have:
libtest.so.1.0.1
- The library file itself, containing the full version
libtest.so.1
- Symlink to libtest.so.1.0.1
, having the same name as soname
libtest.so
- Symlink to libtest.so.1
used for linking.
In the library file libtest.so.1.0.1
, there will be an entry called SONAME
in dynamic section, that will say this library is called libtest.so.1
. When you link a program against this library, the linked program will store the soname
of the library under NEEDED
entry in the dynamic section.
If you want to verify, what exactly is in which ELF file, you can try to run:
readelf -a -W elffile
where elffile
can be either an library of an executable.
If you simply want to get the library version, you can play with:
readelf -d /path/to/library.so |grep SONAME
AFAIK, there's no such info (at least not by default) in executable files.
Or you can rely on the program itself or your packaging system, as Rahul Patil wrote.
Best Answer
Package might not be installed
When people give you information like this you need to make sure you qualify what it actually is. The name
libmysqlclient
is the name of the share library files that are part of this package,mysql-libs
, typically.You can use
repoquery
to look for a corresponding package(s) to start:If you understand how packages get named, then the
.so
files which are "libraries" are in the-libs
packages quite often.Here you can see the file you're asking about,
libmysqlclient
. So you can see this particular package would provide you with.so.16
.Package is already installed
If the files were already installed on the system and you knew that
libmysqlclient
was a file then you can look to RPM for this info:But this would require you to know where this file resided. So instead you can use
yum
to "search" for it: