I had "googled" for a week and most of them suggested to do " rpm -vv --rebuilddb", but it did not work out for me. Please kindly help me out.
rpm --version : RPM version 4.4.2
The case:
Command: rpm -qa
Error:
rpmdb: /var/lib/rpm/Packages: unsupported hash version: 8
error: cannot open Packages index using db3 - Invalid argument (22)
Command: yum
Error:
There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:
/usr/lib/librpmdb-4.4.so: undefined symbol:
poptSaveLong
Please install a package which provides this module, or
verify that the module is installed correctly.
It's possible that the above module doesn't match the
current version of Python, which is:
2.4.3 (#1, Dec 11 2006, 11:38:52)
[GCC 4.1.1 20061130 (Red Hat 4.1.1-43)]
If you cannot solve this problem yourself, please go to
the yum faq at:
http://wiki.linux.duke.edu/YumFaq
Command: rpm -vv --rebuilddb
Error:
D: rebuilding database /var/lib/rpm into /var/lib/rpmrebuilddb.9186
D: creating directory /var/lib/rpmrebuilddb.9186
D: opening old database with dbapi 3
D: opening db environment /var/lib/rpm/Packages create:mpool
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
rpmdb: /var/lib/rpm/Packages: unsupported hash version: 8
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm/Packages
D: removed db environment /var/lib/rpm/Packages
D: opening db file /var/lib/rpm/packages.rpm mode 0x0
D: closed db file /var/lib/rpm/packages.rpm
error: cannot open Packages index
D: removing directory /var/lib/rpmrebuilddb.9186
Command: cat /var/log/rpmpkgs
Error:
error: cannot open Packages index using db3 - Invalid argument (22)
rpmdb: /var/lib/rpm/Packages: unsupported hash version: 8
Sorry for the bad english, but please help to solve out this problem, thx.