yum安装dstat工具报错:error: cannot open Packages index using db5 - (-30973) error: cannot open Packages database in /var/lib/rpm Error: Error: rpmdb open failed【杭州多测师_王sir】

执行yum命令的时候报如下错误:

error: rpmdb: BDB0113 Thread/process 1309432/139989604449152 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
Error: Error: rpmdb open failed

 

解决办法:

cd /var/lib/rpm
rm -rf __db*
rpm --rebuilddb

 

具体步骤如下图:

 

 

 

posted @ 2023-02-15 13:07  多测师_树哥  阅读(119)  评论(0编辑  收藏  举报