yum库配置时 rpmdb open failed

今天安装rhel6.4虚拟机的时候配置yum库时,yum list 报错:

rpmdb: Thread/process 2375/3077719744 failed: Thread died in Berkeley DB library
error: db4 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 -  (-30974)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open faile


通过上网查找资料发现是rpm数据库坏掉了导致的

解决办法:


cd /var/lib/rpm
rm  __db.*(只删除db。00的就可以别的千万别删错哦!!)
rpm --rebuilddb            重建rpm数据库


这回在yum list 就好用了。。


你可能感兴趣的:(虚拟机,database,failed,process,cannot)