Aug 4th, 2010
Error: rpmdb open failed
Error: rpmdb open failed
The “rpmdb open failed” error message is mostly received when the rpm databases __db.00* located under /var/lib/rpm directory are corrupted. This results in a “error: cannot open Packages database” message while installation/updatation of a package via yum.
-rw-r–r– 1 root root 0 Jul 20 21:45 __db.000
-rw-r–r– 1 root root 24576 Aug 4 09:25 __db.001
-rw-r–r– 1 root root 1318912 Aug 4 09:25 __db.002
-rw-r–r– 1 root root 450560 Aug 4 09:25 __db.003
The common fix is to delete the rpm databases and run rebuilddb, like
rm -f /var/lib/rpm/__db*
rpm –rebuilddb
yum update
However, in case of a VPS, yum may still not work with rebuilding rpm database and you have to try create a /dev/urandom device. Login to your VPS and execute
mknod -m 644 /dev/urandom c 1 9
[/dev]# ls -ld urandom
cr–r–r– 1 root root 1, 9 Jul 19 10:27 urandom
To fix the problem permanently, login to Hardware Node and execute:
mknod –mode 644 /vz/private/VEID/fs/root/dev/urandom c 1 9
vzctl start VEID