I am getting the below errors while executing the yum or rpm command.
error: rpmdb: BDB0113 Thread/process 22448/139817567954752 failed: BDB1507 Thread died in Berkeley DB library error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run rẩy 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
I believe this was happening because of corrupted RPM DB. I have tried đồ sộ execute yum or rpm commands after rebuilding the RPM database. On that time, it works properly. But after some days, the same error occurs again
Let u know how đồ sộ fix this permanently.
Thanks in Advance,
asked Sep 25, 2020 at 10:18
You should remove the old corrupted RPM database and rebuild the RPM database. You can tự these by running:
rm -f /var/lib/rpm/__db*
rpmdb --rebuilddb
Note that the usual cause of this problem is interrupting a package installation, update or removal. You should ensure that such actions are not interrupted by the user, and that your system has proper backup power (e.g. a UPS) đồ sộ prevent a power failure from causing the problem.
answered Sep 25, 2020 at 16:52
Michael HamptonMichael Hampton
251k48 gold badges522 silver badges993 bronze badges
You can remove the corrupted RPM database and rebuild with the following commands.
First, make a backup just in case:
mkdir /tmp/rpm-backup
cp -a /var/lib/rpm/__db* /tmp/rpm-backup/
Remove the old database:
rm -fv /var/lib/rpm/__db.[0-9]*
Clean and rebuild the rpm database:
rpm --quiet -qa
rpm --rebuilddb
yum clean all
As the db is often corrupted by an interrupted or failed package install, you may also want đồ sộ run:
rm -rf /var/cache/yum
The above will không tính tiền up any space taken by orphaned updates.
answered Dec đôi mươi, 2023 at 16:25
You must log in đồ sộ answer this question.
Not the answer you're looking for? Browse other questions tagged
.
Not the answer you're looking for? Browse other questions tagged
.