在yum异常退出或者下载出现问题时,在本地存储会有临时文件出现导致再次执行yum时报错
问题
error: rpmdb: BDB0113 Thread/process 3490/41029284672 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
原因
/var/lib/rpm 目录下在执行yum安装时会有 _ _ db开头的临时文件产生,如果非正常退出yum命令时就不会对临时文件处理,造成执行yum命令异常
解决
cd /var/lib/rpm/
rm -rf __db* <- 注意:这是两个下划线_ _
yum clean all
yum makecache
评论区