Linux – RPM unable to find dependencies when attempting to upgrade MySQL

linuxMySQLrpm

I'm trying to upgrade MySQL from 4.1.20 up to 5.1.39. v4.1 was installed via RPMs with no issue, but attempting to upgrade throws up several warnings which appear erroneous, such as:

# rpm --upgrade MySQL-client-5.1.39-0.glibc23.i386.rpm
warning: MySQL-client-5.1.39-0.glibc23.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
error: Failed dependencies:
        libncursesw.so.5 is needed by MySQL-client-5.1.39-0.glibc23
#

Even though I have it installed at /usr/lib/libncurses.so.5

I'm also getting:

# rpm --upgrade MySQL-server-5.1.39-0.glibc23.i386.rpm
warning: MySQL-server-5.1.39-0.glibc23.i386.rpm: V3 DSA signature: NOKEY, key ID 5072e1f5
error: Failed dependencies:
        perl(DBI) is needed by MySQL-server-5.1.39-0.glibc23
#

even though the reported version is 1.609:

# perl -M'DBI 999' -e1
DBI version 999 required--this is only version 1.609.

How can I make RPM see that they're installed? Or is now the time to revert to building from source?

EDIT:
For the record, this is a fairly old Redhat box (i686, although I was trying the i386 RPMs)

Best Answer

Some questions/comments:

  • Which OS are you using?
  • Which arch? If you've got a 64-bit OS with 64-bit ncurses it won't fit to this 32-bit MySQL rpm.
  • From where did you get the rpm? I guess this is the vanilla version from mysql.com. Did you check their system requirements? Did you pick the right package for your distribution/OS? See http://dev.mysql.com/downloads/mysql/5.1.html for packages for all supported OSes. Make sure to match both arch and OS version!
  • libncursesw.so.5 != libncurses.so.5
  • What's the result of the command rpm -qf /usr/lib/libncurses.so.5 ? This will shown from where you've got your libncurses.so.5 file. You could then use rpm -qlv <PKG> to check the contents of this package for libncursesw.so.5.
  • I recommend to get the MySQL version of your OS distribution instead of a version from a 3rd-party because the package dependencies will be unproblematic.
  • I recommend to use yum/apt-get instead of rpm directly if you are not very proficient with rpm because it will resolve the required dependencies automatically for you.
  • rpm does not look at the installed files on your harddisk for dependency resolution. It only looks at the installed rpms (registered in rpm's own db). This means to meet a dependency you have to install the right rpm - it's not sufficient to install the correct files without rpm.