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
9 replies
  1. indexxx.top
    indexxx.top says:

    Hello I am so thrilled I found your blog, I really found you by
    accident, while I was researching on Google for something
    else, Anyways I am here now and would just like to say thanks a lot for a
    tremendous post and a all round enjoyable blog (I also love the theme/design), I don’t
    have time to browse it all at the minute but I
    have bookmarked it and also added in your RSS feeds,
    so when I have time I will be back to read much more,
    Please do keep up the awesome work.

    Reply
  2. deviant.life
    deviant.life says:

    Nice post. I was checking constantly this blog and I am impressed!
    Very helpful info specially the last part 🙂 I care for such information much.
    I was seeking this certain info for a long time. Thank you
    and good luck.

    Reply
  3. New Mature Tube
    New Mature Tube says:

    Good day! I know this is kinda off topic but I’d figured I’d ask.
    Would you be interested in trading links or
    maybe guest writing a blog post or vice-versa? My website goes over a lot of the
    same topics as yours and I think we could greatly benefit from each other.
    If you happen to be interested feel free to send me an email.
    I look forward to hearing from you! Excellent blog
    by the way!

    Reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *