安裝zimbra,遇到幾個suggetst packet沒有安裝,不敢繼續了,果斷中止,想先把這幾個包裝全了。yum的時候,出錯了。
[root@mail zcs-6.0.10_GA_2692.RHEL5.20101215171125]# yum install perl
rpmdb: Lock table is out of available locker entries
rpmdb: Unknown locker ID: 12f8
error: db4 error(22) from db->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.main(sys.argv[1:])
File "/usr/share/yum-cli/yummain.py", line 85, in main
base.getOptionsConfig(args)
File "/usr/share/yum-cli/cli.py", line 163, in getOptionsConfig
disabled_plugins=self.optparser._splitArg(opts.disableplugins))
File "/usr/lib/python2.4/site-packages/yum/__init__.py", line 164, in _getConfig
self._conf = config.readMainConfig(startupconf)
File "/usr/lib/python2.4/site-packages/yum/config.py", line 685, in readMainConfig
yumvars['releasever'] = _getsysver(startupconf.installroot, startupconf.distroverpkg)
File "/usr/lib/python2.4/site-packages/yum/config.py", line 752, in _getsysver
idx = ts.dbMatch('provides', distroverpkg)
TypeError: rpmdb open failed
先備份/var/lib/rpm/
[root@mail backup]# tar cvzf rpmdb-backup.tar.gz /var/lib/rpm
tar: 從成員名中删除開頭的“/”
/var/lib/rpm/
/var/lib/rpm/Requirename
/var/lib/rpm/__db.002
/var/lib/rpm/Installtid
/var/lib/rpm/Basenames
/var/lib/rpm/Triggername
/var/lib/rpm/Sha1header
/var/lib/rpm/__db.001
/var/lib/rpm/Name
/var/lib/rpm/Filemd5s
/var/lib/rpm/Providename
/var/lib/rpm/Conflictname
/var/lib/rpm/Sigmd5
/var/lib/rpm/Group
/var/lib/rpm/Pubkeys
/var/lib/rpm/Provideversion
/var/lib/rpm/__db.003
/var/lib/rpm/Packages
/var/lib/rpm/Dirnames
/var/lib/rpm/Requireversion
/var/lib/rpm/__db.000
然後删除rpm使用的BDB資料庫:
rm /var/lib/rpm/__db.00*
[root@mail backup]# rm /var/lib/rpm/__db.00*
rm:是否删除 一般空檔案 “/var/lib/rpm/__db.000”? y
rm:是否删除 一般檔案 “/var/lib/rpm/__db.001”? y
rm:是否删除 一般檔案 “/var/lib/rpm/__db.002”? y
rm:是否删除 一般檔案 “/var/lib/rpm/__db.003”? y
重建立立rpm資料庫