Fatal error YUM: Thread died in Berkeley DB library
I got an error while upgrading my CentOS server
# yum update rpmdb: Thread/process 29212/3077682880 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
Step 1: Delete Databases
Remove database files from location /var/lib/rpm/
# rm /var/lib/rpm/__db* rm: remove regular file `/var/lib/rpm/__db.001'? y rm: remove regular file `/var/lib/rpm/__db.002'? y rm: remove regular file `/var/lib/rpm/__db.003'? y rm: remove regular file `/var/lib/rpm/__db.004'? y
Step 2: Run updates
Now execute the yum update command.
# yum update Loaded plugins: fastestmirror, security Setting up Update Process Loading mirror speeds from cached hostfile * base: mirror.fysik.dtu.dk * epel: ftp.crc.dk * extras: mirror.fysik.dtu.dk * updates: mirror.fysik.dtu.dk Resolving Dependencies There are unfinished transactions remaining. You might consider running yum-complete-transaction first to finish them. --> Running transaction check ---> Package bind.i686 32:9.8.2-0.30.rc1.el6_6.1 will be updated ---> Package bind.i686 32:9.8.2-0.30.rc1.el6_6.3 will be an update ---> Package bind-chroot.i686 32:9.8.2-0.30.rc1.el6_6.1 will be updated ---> Package bind-chroot.i686 32:9.8.2-0.30.rc1.el6_6.3 will be an update ---> Package bind-devel.i686 32:9.8.2-0.30.rc1.el6_6.1 will be updated ---> Package bind-devel.i686 32:9.8.2-0.30.rc1.el6_6.3 will be an update ---> Package bind-libs.i686 32:9.8.2-0.30.rc1.el6_6.1 will be updated ---> Package bind-libs.i686 32:9.8.2-0.30.rc1.el6_6.3 will be an update ---> Package bind-sdb.i686 32:9.8.2-0.30.rc1.el6_6.1 will be updated ---> Package bind-sdb.i686 32:9.8.2-0.30.rc1.el6_6.3 will be an update ---> Package bind-utils.i686 32:9.8.2-0.30.rc1.el6_6.1 will be updated ---> Package bind-utils.i686 32:9.8.2-0.30.rc1.el6_6.3 will be an update ---> Package busybox.i686 1:1.15.1-20.el6 will be updated ---> Package busybox.i686 1:1.15.1-21.el6_6 will be an update