安装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数据库

rpm --rebuilddb

好像到这里就解决了