CentOS7 YUM无法更新 rpmdb open failed

错误提示

# yum update
mut_tas:172, pid: 581778, flag: 19
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

原因

rpm数据库出错

解决方法

重构rpm数据

mkdir /root/old_rpm_dbs/
mv /var/lib/rpm/__db* /root/old_rpm_dbs/
rpm --rebuilddb -vv
yum clean all

Post Comment