I got “Thread died in Berkeley DB library” error message when I tried to update my CentOS virtual machine.

[root@centos:~] 1 # yum update
rpmdb: Thread/process 13796/139631503578880 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

I tried to rebuild the database without any success :

[root@centos:~] 1 # rpm --rebuilddb
rpmdb: Thread/process 13796/139631503578880 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)

To fix this issue,

  • remove the database files :
[root@centos:~] # rm -f /var/lib/rpm/__db.*
  • Launch “yum update” once :
[root@centos:~] # yum update
Loaded plugins: priorities, protectbase, security
Setting up Update Process
error: rpmdbNextIterator: skipping h#     427 region trailer: BAD, tag 543780467 type 1952541804 offset -1701060712 count 1700881509
714 packages excluded due to repository priority protections
0 packages excluded due to repository protections
No Packages marked for Update
  • Then rebuild the database :
[root@centos:~] 130 # rpm --rebuilddb
error: rpmdbNextIterator: skipping h#     427 region trailer: BAD, tag 775364722 type 1701602657 offset -1936010272 count 1651864608
  • You can update your system now :
[root@centos:~] # yum update
Loaded plugins: priorities, protectbase, security
Setting up Update Process
714 packages excluded due to repository priority protections
0 packages excluded due to repository protections
No Packages marked for Update

 

PDF24    Send article as PDF   

Leave a Reply

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


*