Hi there,
at Tue, April 14th 2009 at 15:17 Nirmal wrote:
NG> bash-3.2# yum
NG> Loaded plugins: fastestmirror
NG> rpmdb: /var/lib/rpm/Packages: unsupported hash version: 9
NG> error: cannot open Packages index using db3 - Invalid argument (22)
NG> error: cannot open Packages database in /var/lib/rpm
After internalization as described you often (when using different yum versions / libraries on host and guest) you have to remove the DB files.
NG> bash-3.2# ls -l /var/lib/rpm/Packages
NG> -rw-r--r-- 1 root root 4915200 May 27 12:16 /var/lib/rpm/Packages
NG> [root@zaphod /]# vserver cent5 exec bash -c "rm -f
NG> /var/lib/rpm/__db*; rpm --rebuilddb"
NG> rpmdb: /var/lib/rpm/Packages: unsupported hash version: 9
NG> error: cannot open Packages index using db3 - Invalid argument (22)
Yes, I had this problem as well. There is a version step on CentOS (which I cannot name exactly, but existing both in 4x and 5.x) where this failure is produced by local cached rpm packages. To solve this, simply remove th local (guest) cached packages file as well as the DB files by "rm -f /var/lib/rpm/Packages" and "/var/lib/rpm/__db*" followed by the "rpm --rebuilddb". This should solve your problem. Once again as single line for copy & paste:
rm -f /var/lib/rpm/Packages; rm -f /var/lib/rpm/__db*; rpm --rebuilddb
-- Greetings, Guenther FuchsReceived on Sat May 29 20:26:41 2010