故障描述:今天下午测试OpenStack,在使用yum安装一个包的时候,手欠了下,结果被我终止了,如是有了下面的记录
先清空下缓存,发现rpmdb open failed
1 2 3 4 5 6 | [root@linux-node1 glance] # yum clean all error: rpmdb: BDB0113 Thread /process 21357 /140557926295360 failed: BDB1507 Thread died in Berkeley DB library error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Packages index using db5 - (-30973) CRITICAL:yum.main: Error: rpmdb open failed |
然后试了下yum makecache,问题仍旧不能解决
1 2 3 4 5 6 7 | [root@linux-node1 glance] # yum makecache error: rpmdb: BDB0113 Thread /process 21357 /140557926295360 failed: BDB1507 Thread died in Berkeley DB library error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run database recovery error: cannot open Packages index using db5 - (-30973) error: cannot open Packages database in /var/lib/rpm CRITICAL:yum.main: Error: rpmdb open failed |
解决方法:
1 2 3 4 5 6 7 8 9 10 11 | [root@linux-node1 glance] # ls /var/lib/rpm/ Basenames __db.001 __db.003 Dirnames Installtid Obsoletename Providename .rpm.lock Sigmd5 Conflictname __db.002 .dbenv.lock Group Name Packages Requirename Sha1header Triggername [root@linux-node1 glance] # rm -f /var/lib/rpm/__db* You have new mail in /var/spool/mail/root [root@linux-node1 glance] # rpm --rebuilddb [root@linux-node1 glance] # yum clean all Loaded plugins: fastestmirror, langpacks Cleaning repos: base centos-ceph-hammer centos-openstack-mitaka centos-qemu-ev epel extras updates Cleaning up everything Cleaning up list of fastest mirrors |
问题得到解决
本文转自 冰冻vs西瓜 51CTO博客,原文链接:http://blog.51cto.com/molewan/1906370,如需转载请自行联系原作者