Installing perl-DBD-MySQL and Dealing with Dependency Issues on Linux

The other day, I just posted an article about setting up Perl on Windows for MySQL.

However, I just ran into an interesting Perl issue on Linux, and it was one slightly out of the ordinary, so I wanted to share the solution, as one might not find this one quickly otherwise.

The problem occured when trying to install the perl-DBD-MySQL module on a linux (CentOS) server, due to a dependency issue.

Most dependency issues are a little more straight-forward, but this one is what I’d almost call a ‘reverse’ dependency issue.

Here was the command:

shell$ yum install perl-DBD-MySQL

Here was the output/error:

Loaded plugins: dellsysid, fastestmirror
Loading mirror speeds from cached hostfile
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-DBD-MySQL.x86_64 0:3.0007-2.el5 set to be updated
--> Processing Dependency: for package: perl-DBD-MySQL
--> Processing Dependency: for package: perl-DBD-MySQL
--> Running transaction check
---> Package mysql.x86_64 0:5.0.77-4.el5_4.2 set to be updated
--> Processing Conflict: mysql conflicts MySQL
--> Finished Dependency Resolution
mysql-5.0.77-4.el5_4.2.x86_64 from updates-20100420 has depsolving problems
--> mysql conflicts with MySQL-server
Error: mysql conflicts with MySQL-server
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
package-cleanup --dupes
rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.

Key facts are that this server is now running 5.5, but was running 5.0.77 at a prior time.

Just off the top, my initial quick thought was that an old 5.0.77 remnant was causing the conflict. So I checked all installed mysql rpms:

shell$ rpm -qa -last | grep -i mysql
MySQL-test-5.5.16-1.linux2.6 Tue 25 Jan 2011 12:54:28 PM EST
MySQL-server-5.5.16-1.linux2.6 Tue 25 Jan 2011 12:54:20 PM EST
MySQL-shared-5.5.16-1.linux2.6 Tue 25 Jan 2011 12:54:15 PM EST
MySQL-client-5.5.16-1.linux2.6 Tue 25 Jan 2011 12:54:13 PM EST
MySQL-devel-5.5.16-1.linux2.6 Tue 25 Jan 2011 12:54:09 PM EST

Hrm, no mention of any 5.0 remnant…

Looking closer at the error shows that yum is wanting to install But, is from MySQL 5.0! (Seems yum is just being conservative here.) So, that is what conflicted with the 5.5 shared library that’s already installed.

Had “MySQL-shared-compat-5.5.16″ (client libraries, including support for older clients) been installed as opposed to just “MySQL-shared-5.5.16″ (5.5 client libs), then the perl-DBD-MySQL would have installed fine.

And just be certain, we installed the shared-compat (used rpm -Uvh package_name), then re-ran the “yum install perl-DBD-MySQL”, and it installed perfectly.

Hope this helps any out there who run into this issue using yum to install the perl-DBD-MySQL module on 5.5 (and if you didn’t install shared-compat).

Tags: , , , , , , , , , , ,

2 Responses to “Installing perl-DBD-MySQL and Dealing with Dependency Issues on Linux”

  1. Paul says:

    I have the same problem but on CentOS 5.7 with cPanel, do you know how to reinstall apache with custom arguments to use that package suggested?

  2. Ken says:

    Thanks for this post. I had this same error when yum wanted to update postfix. Installing MySQL-shared-compat solved the problem.

Period Panties by Period Panteez Menstrual Underwear Menstruation PMS Panty