Fix error ‘rpmdb: PANIC: fatal region error detected’ when use yum on CentOS/RHEL
You are using CentOS/RHEL OS and perform some action with yum
to install package through repository. Then you encounter this kind error ‘rpmdb: PANIC: fatal region error detected; run recovery’ :
rpmdb: PANIC: fatal region error detected; run recovery error: db3 error(-30974) from dbenv->open: 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
How to fix errror ‘rpmdb: PANIC: fatal region error detected’ on CentOS/RHEL
This is messed case, but you can follow the way to fix it by cleaning out RPM DB and rebuild it. First of all, you need to backup some files in directory ‘/var/lib/rpm’.
# mkdir /backup/rpm.bk # cp -avr /var/lib/rpm/ /backup/rpm.bk
Remove current files and rebuild rpm db.
# rm -f /var/lib/rpm/__db* # db_verify /var/lib/rpm/Packages/ # rpm —rebuildb # yum clean all
Finally, we need to verify the status of fixing.
# yum update
Ok, so that all the steps you need to do for fixing the error ‘rpmdb: PANIC: fatal region error detected’.
Nguồn: https://cuongquach.com/