Tag Archives: error: rpmdb: BDB0113 failed: BDB1507 Thread died in Berkeley DB library

[Solved] yum Install rpmdb Error: error: rpmdb: BDB0113 failed: BDB1507 Thread died in Berkeley DB library

Yum setup failed in CentOS

Yum failed to install git with the following error prompt

[root@doc1 data]# yum -y install git
error: rpmdb: BDB0113 Thread/process 16754/139715004069952 failed: BDB1507 Thread died in Berkeley DB library
error: db5 error(-30973) from dbenv->failchk: BDB0087 DB_RUNRECOVERY: Fatal error, run 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

Solution:

View RPM Directory:/var/lib/rpm

Enter cat/var/lib/RPM
CD/var/lib/rpm on the command line

 [root@doc1 data]# cd /var/lib/rpm
[root@doc1 rpm]# ls
Basenames     __db.002  Group       Obsoletename  Requirename  Triggername
Conflictname  __db.003  Installtid  Packages      Sha1header
__db.001      Dirnames  Name        Providename   Sigmd5

Delete database file

rm -f /var/lib/rpm/__db.*

[root@doc1 rpm]# rm -f /var/lib/rpm/__db.*

Rebuild RPM database

rpm –rebuilddb

[root@doc1 rpm]# rpm --rebuilddb

Clear Yum’s cache

yum clean all

[root@doc1 rpm]# yum clean all
Loaded plugins: fastestmirror, langpacks
Repodata is over 2 weeks old. Install yum-cron?Or run: yum makecache fast
Cleaning repos: Subversion epel extras jenkins os updates
Cleaning up list of fastest mirrors
Other repos take up 6.5 M of disk space (use --verbose for details)

Rebuild Yum cache

yum makecache

[root@doc1 rpm]# yum makecache
Loaded plugins: fastestmirror, langpacks
Determining fastest mirrors
Subversion                                               | 2.9 kB     00:00
epel                                                     | 4.7 kB     00:00
extras                                                   | 2.9 kB     00:00
jenkins                                                  | 2.9 kB     00:00
os                                                       | 3.6 kB     00:00
updates                                                  | 2.9 kB     00:00
(1/22): Subversion/7/x86_64/primary_db                     |  66 kB   00:00
(2/22): Subversion/7/x86_64/filelists_db                   |  71 kB   00:00
(3/22): epel/7/x86_64/group_gz                             |  96 kB   00:00
(4/22): Subversion/7/x86_64/other_db                       | 7.7 kB   00:00
(5/22): epel/7/x86_64/updateinfo                           | 1.0 MB   00:00
(6/22): epel/7/x86_64/prestodelta                          |  708 B   00:00
(7/22): epel/7/x86_64/primary_db                           | 7.0 MB   00:00
(8/22): epel/7/x86_64/other_db                             | 3.4 MB   00:00
(9/22): extras/7/x86_64/primary_db                         | 243 kB   00:00
(10/22): extras/7/x86_64/filelists_db                      | 259 kB   00:00
(11/22): extras/7/x86_64/other_db                          | 145 kB   00:00
(12/22): epel/7/x86_64/filelists_db                        |  12 MB   00:00
(13/22): jenkins/filelists_db                              |  24 kB   00:01
(14/22): os/7/x86_64/group_gz                              | 153 kB   00:00
(15/22): os/7/x86_64/primary_db                            | 6.1 MB   00:00
(16/22): jenkins/primary_db                                |  40 kB   00:02
(17/22): os/7/x86_64/filelists_db                          | 7.2 MB   00:00
(18/22): os/7/x86_64/other_db                              | 2.6 MB   00:00
(19/22): updates/7/x86_64/primary_db                       |  13 MB   00:00
(20/22): updates/7/x86_64/filelists_db                     | 7.4 MB   00:00
(21/22): updates/7/x86_64/other_db                         | 959 kB   00:00
(22/22): jenkins/other_db                                  |  40 kB   00:01
Metadata Cache Created