I'm trying to figure out a very strange problem with yum on a fairly old CentOS 5.11 VPS using DirectAdmin.

Executing the following command suggests the telnet package is installed:

# yum install telnet
  telnet.x86_64 1:0.17-41.el5  

However, telnet is still missing:

# which telnet
/usr/bin/which: no telnet in (/root/local/node/bin:/usr/local/share/npm/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/share/adt-bundle/tools:/root/share/adt-bundle/platform-tools)

My version of Yum is 3.2.22.

Perhaps a hint of what is going wrong is that I appear to have different versions of rpm installed somehow. If I try to verify my RPM database, my database version appears invalid:

# rpm --version
RPM version 4.3.3
# rpm --verify telnet
rpmdb: Program version 4.2 doesn't match environment version
error: db4 error(22) from dbenv->open: Invalid argument
error: cannot open Packages index using db3 - Invalid argument (22)
error: cannot open Packages database in /var/lib/rpm
package telnet is not installed

If I rebuild the RPM database using the following command:

rm -rf /var/lib/rpm/__db* && rpm --rebuilddb

Yum gives a similar error, but complaining about a newer version:

# yum update
Loaded plugins: fastestmirror
rpmdb: Program version 4.3 doesn't match environment version
error: db4 error(-30974) from dbenv->open: DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db3 -  (-30974)
error: cannot open Packages database in /var/lib/rpm

Removing the /var/lib/rpm/__db* files gets Yum past this again, but installed packages still appear to be missing.

I get the feeling that Yum is somehow misconfigured or that I have two different versions of RPM. What can I do to diagnose the problem to ultimately work to a resolution?


I think it is your rpm install which is somehow off. I would expect on CentOS 5.11 with yum 3.2.22 installed that your rpm version would be, not 4.3.3

Specifically the rpm-libs package installs /usr/lib64/librpmdb-4.4.so which yum 3.2.22 requires but I am guessing you have /usr/lib64/librpmdb-4.3.so

I suggest you download the new rpm-*4.4.*rpm from the updates repo and install them with rpm by hand.

  • Thanks, that seems likely. I took a look, and I have both librpmdb-4.3.so and librpmdb-4.4.so in lib64. (Also librpmio.) How could I best go about removing 4.3? – Paul Lammertsma Jun 24 '15 at 8:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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