How can I find which version of libmysqlclient is installed in Centos?
Solution 1
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:
$ repoquery --whatprovides *libmysqlclient*
mysql-libs-0:5.1.71-1.el6.x86_64
mysql-devel-0:5.1.71-1.el6.x86_64
mysql-libs-0:5.1.71-1.el6.i686
mysql-devel-0:5.1.71-1.el6.i686
abi-compliance-checker-0:1.99.8.5-1.el6.noarch
If you understand how packages get named, then the .so
files which are "libraries" are in the -libs
packages quite often.
$ repoquery -l mysql-libs-0:5.1.71-1.el6.x86_64 | head -9
/etc/ld.so.conf.d/mysql-x86_64.conf
/etc/my.cnf
/usr/lib64/mysql
/usr/lib64/mysql/libmysqlclient.so.16
/usr/lib64/mysql/libmysqlclient.so.16.0.0
/usr/lib64/mysql/libmysqlclient_r.so.16
/usr/lib64/mysql/libmysqlclient_r.so.16.0.0
/usr/share/doc/mysql-libs-5.1.71
/usr/share/doc/mysql-libs-5.1.71/COPYING
...
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:
$ rpm -q --whatprovides /usr/lib64/mysql/libmysqlclient.so.16
But this would require you to know where this file resided. So instead you can use yum
to "search" for it:
$ yum whatprovides "*libmysqlclient*"
Solution 2
The easiest way is to ask RPM which version it is: rpm -q mysql-devel
.
You could also use yum info mysql-devel
.
If you need the ABI version of the library itself, you need to say something like ls /usr/lib64/mysql/libmysqlclient*
. CentOS 6 ships ABI version 16 libraries, for example. Use lib
instead of lib64
for a 32-bit system.
Related videos on Youtube
blarg
Updated on September 18, 2022Comments
-
blarg almost 2 years
I have a custom exe provided to me but to install it I need an older version of libmysqlclient. How can I check which version is installed?