跳到正文

游民营地

主题: 开发运维

fix the problem "yum rpmdb open failed" when installing apps on CentOS 7

记录 CentOS 安装软件时 rpmdb open failed 的排查和修复步骤。

作者 一只游民Developer and YouTuber

发布于 更新于 约 1 分钟读完

fix the problem "yum rpmdb open failed" when installing apps on CentOS 7封面

when trying to install applications on CentOS, you may get some errors like something below:

在centos系统上,在使用yum命令安装软件包时候报错:

rpmdb: Thread/process 35884/139793484506880 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

the database of the RPM was broken is the reason for this issue, we can try to fix it by the commands below:

原因是RPM数据库被破坏,使用以下命令重建数据库后即可修复:

cd /var/lib/rpm
ls | grep 'db.'
rm -f __db.*
rpm --rebuilddb
yum clean all

评论

评论由 GitHub Discussions 提供。发表评论、回复或添加反应需要使用 GitHub 登录。

正在加载评论服务…

同一本笔记里的另外三篇,按主题挑选,不靠算法。

更多好文