重做yum库

出现报错,不能使用yum

[root@DB107916083 yum.repos.d]# yum install iostop -y
rpmdb: Thread/process 37772/140171753846688 failed: Thread died in Berkeley DB library
error: db3 error(-30974) from dbenv->failchk: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 - (-30974)
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed

解决

cd /var/lib/rpm/
/bin/rm -f /var/lib/rpm/__db*
rpm --rebuilddb
yum clean all
yum makecache
posted @ 2021-12-13 14:43  SpecialSpeculator  阅读(42)  评论(0编辑  收藏  举报