error: cannot open Packages database in /var/lib/rpm
无法从 /var/lib/rpm 打开软件包数据库
centos安装软件或者更新出现这个错误
可能由于强制结束了yum操作而导致rpm数据库被损坏了!
error: rpmdb: BDB0113 Thread/process 26718/140419168729152 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
解决方案:
删除损坏的DB文件:
cd /var/lib/rpm
rm -rf /var/lib/rpm/__db.*
重建rpm数据库:
rpm --rebuilddb
生成索引缓存:
yum makecache
end!
本文作者为QioCuIi,转载请注明。