Bug #17035 Dependency conflicts on RHEL4 with 5.0 RPMS
Submitted: 2 Feb 2006 11:12 Modified: 8 Mar 2006 2:26
Reporter: Arjen Lentz Email Updates:
Status: Not a Bug Impact on me:
Category:MySQL Server: Packaging Severity:S3 (Non-critical)
Version:5.0.18 OS:Linux (RHEL4)
Assigned to: Colin Charles CPU Architecture:Any

[2 Feb 2006 11:12] Arjen Lentz
Red Hat Enterprise Linux ES release 4 (Nahant Update 2)

RHEL4 basic MySQL stuff installed:

Trying to upgrade to MySQL 5.0.18 using following RPMs from mysql.com

$sudo rpm -Uvh MySQL*.rpm
warning: MySQL-client-standard-5.0.18-0.rhel4.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
error: Failed dependencies:
        libmysqlclient.so.14 is needed by (installed) cyrus-sasl-sql-2.1.19-5.EL4.i386
        libmysqlclient.so.14 is needed by (installed) dovecot-0.99.11-2.EL4.1.i386
        libmysqlclient.so.14 is needed by (installed) perl-DBD-MySQL-2.9004-3.1.i386

I'd rather not use --force as that may cause things to break.

How to repeat:
See description.

Suggested fix:
Deal appropriately with dependencies as suitable for target distro.
[2 Feb 2006 11:15] Lenz Grimmer
Can you please provide the output of "rpm -q --whatprovides libmysqlclient.so.14" ?
[2 Feb 2006 11:18] Arjen Lentz
$ rpm -q --whatprovides libmysqlclient.so.14
[2 Feb 2006 11:26] Lenz Grimmer
It's the same old story, Red Hat puts the shared libraries into the same package as the client applications instead of separing these into a "mysql-shared" and "mysql-client" subpackage. As you are trying to update to MySQL 5.0, this would break the shared library dependencies of the installed applications that were linked against the default MySQL 4.1 from Red Hat (as your package would update the installed "mysql" RPM to a newer version, thus updating to newer version of the shared libs, too).

To work around this, we provide the "shared-compat" RPM, that you can get from the Downloads section. It contains the 4.1 shared libraries as well, which will fulfil this dependency.
[2 Feb 2006 11:40] Arjen Lentz
When using the generic shared-compat RPM rather than the shared-standard as suggested by Lenz, the upgrade works.
However.... no mysql user/group exist. Had to do rpm -e on the server RPM and then rpm -i again. Then the user/group were created and the server started correctly.
This would indicate a post-installation script failing to do its job?
[27 Feb 2006 16:25] Jorge del Conde
Tested under RHEL4
[8 Mar 2006 2:21] Kent Boortz
This is a bug in the Red Hat MySQL RPMs I think.
The way upgrades work is described at the end
of the page


After our pre/post install scripts are run, the pre/post
deinstall scripts of the Red Hat package will be run. And
the Red Hat postuninstall script does a "userdel mysql".

But reading the RPM documentation the upgrade behaviour
puzzles me a bit too. In the Red Hat RPM the postdeinstall
will remove the rc.d/* scripts as well.

I don't understand how updates between their own
MySQL releases could work with this deinstall script.

% rpm --scripts -qp mysql-server-4.1.16-1.FC4.1.i386.rpm
warning: mysql-server-4.1.16-1.FC4.1.i386.rpm: V3 DSA signature: NOKEY, key ID 4f2a6fd2
preinstall scriptlet (using /bin/sh):
/usr/sbin/useradd -M -o -r -d /var/lib/mysql -s /bin/bash \
        -c "MySQL Server" -u 27 mysql > /dev/null 2>&1 || :
postinstall scriptlet (using /bin/sh):
if [ $1 = 1 ]; then
    /sbin/chkconfig --add mysqld
/bin/chmod 0755 /var/lib/mysql
/bin/touch /var/log/mysqld.log
preuninstall scriptlet (using /bin/sh):
if [ $1 = 0 ]; then
    /sbin/chkconfig --del mysqld
postuninstall scriptlet (using /bin/sh):
if [ $1 -ge 1 ]; then
    /sbin/service mysqld condrestart >/dev/null 2>&1 || :
if [ $1 = 0 ] ; then
        userdel mysql >/dev/null 2>&1 || :
[8 Mar 2006 2:26] Arjen Lentz
Ok should this should be chased up with Red Hat really. Something for the future.
[14 Apr 2006 14:35] [ name withheld ]
I have just gone through this same situation, so i thought i would post what I did to get it to work:

Don't download the shared-standard file, or rename it so it does not install when the others do...

Then rename /etc/init.d/mysql and /etc/my.cnf 

Then the install will work.  If you have already tried and now it is all messed up use: rpm -ivh --force --replacefiles MySQL-*
in the directory you have all the rpm files.  it will need to put them all in at once, except teh shared standard.

i guess ver 5 puts things in different locations, so you have to remove/rename those files so they will get the new versions.  rpms will not override config files by design.

This was done on redhat ES 4 to mySQL 5, hope it helps...
[9 May 2007 4:13] LOUIS SELVON
I am trying to upgrade mysql to 5.0 and am getting this error message

# rpm -Uvh MySQL*.rpm
warning: MySQL-client-community-5.0.37-0.rhel4.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
error: Failed dependencies:
        perl(HTML::Template) is needed by MySQL-clustertools-community-5.0.37-0.rhel4.i386

Is there any specific order I should install the rpms ? How do I resolve this error ?

Thank You
[15 Oct 2007 22:03] Donovan Hsieh
I get the same error as reported by "LOUIS SELVON" when installing the MySQL cluster tool rpm on my Redhat EL4:

# rpm -Uvh MySQL-clustertools-community-5.0.45-0.rhel4.i386.rpm 
warning: MySQL-clustertools-community-5.0.45-0.rhel4.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
error: Failed dependencies:
        perl(HTML::Template) is needed by MySQL-clustertools-community-5.0.45-0.rhel4.i386

I wonder if any one has found the solution to this problem?