Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 2 down vote accepted

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*

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

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*"
share|improve this answer

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.