关于yum安装时rpmdb损坏解决方案

Loaded plugins: fastestmirror rpmdb: Lock table is out of available locker entries rpmdb: Unknown locker ID: caf error: db4 error(22) from dbenv->close: ÎÞЧµÄ²ÎÊý error: cannot open Packages index using db3 - ÎÞ·¨·ÖÅäÄÚ´æ (12) error: cannot open Packages database in /var/lib/rpm Traceback (most recent call last): File "/usr/bin/yum", line 29, in ? yummain.user_main(sys.argv[1:], exit_code=True) File "/usr/share/yum-cli/yummain.py", line 309, in user_main errcode = main(args) File "/usr/share/yum-cli/yummain.py", line 157, in main base.getOptionsConfig(args) File "/usr/share/yum-cli/cli.py", line 187, in getOptionsConfig self.conf File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 664, in conf = property(fget=lambda self: self._getConfig(), File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 239, in _getConf ig self._conf = config.readMainConfig(startupconf) File "/usr/lib/python2.4/site-packages/yum/config.py", line 804, in readMainCo nfig yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.dist roverpkg) File "/usr/lib/python2.4/site-packages/yum/config.py", line 877, in _getsysver idx = ts.dbMatch('provides', distroverpkg) TypeError: rpmdb open failed [root@TT01 qiaozhou]# rpm --rebuilddb rpmdb: Lock table is out of available locker entries rpmdb: Unknown locker ID: cb1 error: db4 error(22) from dbenv->close: ÎÞЧµÄ²ÎÊý error: cannot open Packages index using db3 - ÎÞ·¨·ÖÅäÄÚ´æ (12)

解决方案如下:

# cd /var/lib/rpm
# rm -f /var/lib/rpm/__db*
# db_verify Packages
# rpm --rebuilddb

你可能感兴趣的:(服务器安装)