error: cannot open Packages database in /var/lib/rpm
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了error: cannot open Packages database in /var/lib/rpm相关的知识,希望对你有一定的参考价值。
故障描述:今天下午测试OpenStack,在使用yum安装一个包的时候,手欠了下,结果被我终止了,如是有了下面的记录
先清空下缓存,发现rpmdb open failed
[[email protected] 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,问题仍旧不能解决
[[email protected] 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
解决方法:
[[email protected] 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 [[email protected] glance]# rm -f /var/lib/rpm/__db* You have new mail in /var/spool/mail/root [[email protected] glance]# rpm --rebuilddb [[email protected] 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西瓜” 博客,请务必保留此出处http://molewan.blog.51cto.com/287340/1906370
以上是关于error: cannot open Packages database in /var/lib/rpm的主要内容,如果未能解决你的问题,请参考以下文章
Linux - error: cannot open Packages database in /var/lib/rpm
Linux - error: cannot open Packages database in /var/lib/rpm
LINK : fatal error LNK1104: cannot open file 'mfcs42d.lib'
error while loading shared libraries: libiksemel.so.3: cannot open shared...
yum error: cannot open Packages database in /var/lib/rpm
Transport Error: Cannot get remote repository refs.https://github.com/xxx/test1.git: cannot open git