一、yum安装时,报错信息
代码语言:javascript复制#yum install net-tools
error: rpmdb: BDB0113 Thread/process 31403/139827795044416 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
二、解决
2.1 查看/var/lib/rpm目录
2.2 删除/var/lib/rpm目录下的__db开头的rpmdb文件
代码语言:javascript复制rm -f /var/lib/rpm/__db*
2.3 rpm数据库重建
代码语言:javascript复制rpm --rebuilddb
2.4 清理所有yum缓存
代码语言:javascript复制yum clean all
2.5 重新生成yum缓存
代码语言:javascript复制yum makecache
本文为joshua317原创文章,转载请注明:转载自joshua317博客 https://www.joshua317.com/article/234