YUM error: dbiOpen: dbapi 1 not available

496 Views Asked by At
[root@tux lib]# yum clean all
error: dbiOpen: dbapi 1 not available
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed

I have tried following:

rm -rf /var/lib/rpm/__db*
rpm --rebuilddb

But no luck :(

[root@tux lib]# yum clean all
error: dbiOpen: dbapi 1 not available
error: cannot open Packages database in /var/lib/rpm
CRITICAL:yum.main:

Error: rpmdb open failed

I have search all over internet but didn't find solution :(

2

There are 2 best solutions below

0
On

The dbapi chooses a version of Berkeley DB to use, in this case db-1.85, which has been obsolete in RPM for more than 10y.

You can see the setting of the macro for dbapi by examining "rpm --showrc" and can change the value in /usr/lib/rpm/macros (or other macro file).

What version of linux and rpm is this?

0
On

Solution:

I have re-install rpm package again with --force and it solved issue.