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

When I want to install perl-DBD-MySQL on my CentOS 6.3 system, I get this error:

yum install perl-DBD-MySQL.x86_64

Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: perl-DBD-MySQL-4.013-3.el6.x86_64
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: perl-DBD-MySQL-4.013-3.el6.x86_64
--> Finished Dependency Resolution
Error: Package: perl-DBD-MySQL-4.013-3.el6.x86_64 (base)
           Requires: libmysqlclient.so.16()(64bit)
Error: Package: perl-DBD-MySQL-4.013-3.el6.x86_64 (base)
           Requires: libmysqlclient.so.16(libmysqlclient_16)(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

Using --skip-broken:

Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-DBD-MySQL.x86_64 0:4.013-3.el6 will be installed
--> Processing Dependency: libmysqlclient.so.16(libmysqlclient_16)(64bit) for package: perl-DBD-MySQL-4.013-3.el6.x86_64
--> Processing Dependency: libmysqlclient.so.16()(64bit) for package: perl-DBD-MySQL-4.013-3.el6.x86_64
--> Finished Dependency Resolution

Packages skipped because of dependency problems:
    perl-DBD-MySQL-4.013-3.el6.x86_64 from base

What package should I install?

share|improve this question
1  
This issue is a bit old but as I had encountered the same kind of issue and landed on this page. So, I'd like to add an answer, which is there: stackoverflow.com/questions/37756308/… – cdr Jun 15 at 13:13
up vote 3 down vote accepted

Any time you encounter the installation of a package that complains it "requires" something, you should try and remember to use this command to determine what RPM package provides this file. In your case the message:

       Requires: libmysqlclient.so.16()(64bit)

is supposed to be a hint. Granted, it's a little weak, but with this info you can run the following command to determine the package that contains this .so library file:

$ yum provides "*libmysqlclient.so.16*"

which will give you the following:

mysql-libs-5.1.69-1.el6_4.x86_64 : The shared libraries required for MySQL clients
Repo        : installed
Matched from:
Other       : libmysqlclient.so.16()(64bit)
Other       : libmysqlclient.so.16(libmysqlclient_16)(64bit)
Filename    : /usr/lib64/mysql/libmysqlclient.so.16.0.0
Filename    : /usr/lib64/mysql/libmysqlclient.so.16

NOTE: You'll likely get multiple hits, one for each version of this package that's in the yum repositories.

From this you now know which package provides the file, mysql-libs. So just do this to install it:

$ sudo yum install mysql-libs

This package looks to be part of the base installation and was available in the updates repo under CentOS 6.4.

$ repoquery --location mysql-libs
http://mirrors.advancedhosters.com/centos/6.4/updates/x86_64/Packages/mysql-libs-5.1.69-1.el6_4.i686.rpm
http://mirrors.advancedhosters.com/centos/6.4/updates/x86_64/Packages/mysql-libs-5.1.69-1.el6_4.x86_64.rpm
share|improve this answer
    
Thanks but I get this message : No package mysql-libs available. for sudo yum install mysql-libs – hpn Jul 7 '13 at 8:10
    
@hpn - what's your version of CentOS? I'm on CentOS 6.4 and it's in the updates repo which is part of the base installation. – slm Jul 7 '13 at 8:18
    
It's 6.3 ...... – hpn Jul 7 '13 at 8:23
    
@hpn - run this command to see what repos you have yum repolist. updates should be in that list. – slm Jul 7 '13 at 8:29
    
Yes. updates is included, but repoquery --location mysql-libs returns nothing – hpn Jul 7 '13 at 8:42

As from your question it is not clear, which version of CentOS you use and if it is MySQL or MariaDB packages for database you have, I will provide my solution, which works on CentOS 7 for MariaDB.

I have installed MariaDB engine from https://downloads.mariadb.org/mariadb/repositories/#mirror=kisiek&distro=CentOS&distro_release=centos7-amd64--centos7&version=10.1 and my dependency problem has gone.

As for any other platform, where you might experience similiar problem, try to choose your OS from: https://downloads.mariadb.org/mariadb/repositories/#mirror=kisiek It didn't require any additional work after installing MariaDB from their official repository.

But still, the question is not verbose enough to provide proper answer for your case - my answer may or may not be helpful for you.

share|improve this answer

Your Answer

 
discard

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.