Bug 23511

Summary: RPM is failed after update failure and rebuild its db.
Product: LTSP Reporter: Tguo <guouoo>
Component: InstallerAssignee: Jim McQuillan <jam>
Status: NEW --- QA Contact:
Severity: critical    
Priority: high Keywords: patch
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Tguo 2009-08-25 11:16:47 UTC
NowI co'uldn't update or install any packages, and also couldn't reinstall or fix the issues about RPM. 
----------------------------------------------------
[root@taff]# yum  cleanall
Loaded plugins: refresh-packagekit
rpmdb: /var/lib/rpm/Packages: unsupported hash version: 9
error: cannot open Packages index using db3 - Invalid argument (22)
error: cannot open Packages database in /var/lib/rpm
Traceback (most recent call last):
  File "/usr/bin/yum", line 29, in <module>
    yummain.user_main(sys.argv[1:], exit_code=True)
  File "/usr/share/yum-cli/yummain.py", line 229, in user_main
    errcode = main(args)
  File "/usr/share/yum-cli/yummain.py", line 84, in main
    base.getOptionsConfig(args)
  File "/usr/share/yum-cli/cli.py", line 184, in getOptionsConfig
    enabled_plugins=self.optparser._splitArg(opts.enableplugins))
  File "/usr/lib/python2.5/site-packages/yum/__init__.py", line 192, in _getConfig
    self._conf = config.readMainConfig(startupconf)
  File "/usr/lib/python2.5/site-packages/yum/config.py", line 758, in readMainConfig
    yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
  File "/usr/lib/python2.5/site-packages/yum/config.py", line 828, in _getsysver
    idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed
-------------------------------------------------------
[root@taff download]# rpm -ivh rpm-build-4.7.1-1.fc11.i586.rpm 
rpmdb: Program version 4.7 doesn't match environment version 4.5
error: db4 error(-30971) from dbenv->open: DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db3 -  (-30971)
error: cannot open Packages database in /var/lib/rpm
warning: rpm-build-4.7.1-1.fc11.i586.rpm: Header V3 RSA/SHA256 signature: NOKEY, key ID d22e77f2
rpmdb: Program version 4.7 doesn't match environment version 4.5
error: db4 error(-30971) from dbenv->open: DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages database in /var/lib/rpm
--------------------------------------------------------
  

I think those problems are terrible:

rpmdb: Program version 4.7 doesn't match environment version 4.5
rpmdb: /var/lib/rpm/Packages: unsupported hash version: 9
error: cannot open Packages index using db3 - Invalid argument (22)

Is there any friends meet this problem? Pls help to fix them. Thanks so much!

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.