error: cannot open Packages database in /var/lib/rpm

在Linux上使用yum 安装软件时候提示错误:

[root@txvm2019 rabbitmq]# yum install socat -y
error: rpmdb: BDB0113 Thread/process 16035/139850996197440 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:

解决方法,执行以下命令删除rpm,重新构建rpm数据库即可:

cd /var/lib/rpm

rm -rf __db*

rpm --rebuilddb

上一篇:开机自启动 国产化打包rpm


下一篇:Ansible之常见模块