# rpmdb open failed

**URL:** <https://community.unix.com/t/rpmdb-open-failed/286771>\
**Category:** Red Hat\
**Created:** [April 21, 2011, 1:57pm UTC](https://community.unix.com/t/rpmdb-open-failed/286771 "2011-04-21T13:57:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![sef\_alislam](https://community.unix.com/user_avatar/community.unix.com/sef_alislam/32/6908_2.png) [@sef\_alislam](https://community.unix.com/u/sef_alislam)\
**Post date:** [April 21, 2011, 1:57pm UTC](https://community.unix.com/t/rpmdb-open-failed/286771/1 "2011-04-21T13:57:41Z")

</div>

Hi,

```nohighlight
[root@localhost]# yum --skip-broken -y update
rpmdb: Thread/process 6657/3078387392 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

```

note:  
i'm using fedora 14 with kernel 2.6.35.12-88.fc14.i686

---------- Post updated at 19:57 ---------- Previous update was at 19:38 ----------

Oh sorry i got it !

1- rm /var/lib/rpm/\_\_db\*  
2- yum --rebuilddb  
3- yum -y update

---

<div class="post-metadata">

**Author:** ![pludi](https://community.unix.com/user_avatar/community.unix.com/pludi/32/1278_2.png) [@pludi](https://community.unix.com/u/pludi)\
**Post date:** [April 21, 2011, 2:49pm UTC](https://community.unix.com/t/rpmdb-open-failed/286771/2 "2011-04-21T14:49:14Z")

</div>

Thanks for sharing the solution with us.

---

<div class="post-metadata">

**Author:** ![bakunin](https://community.unix.com/letter_avatar/bakunin/32/6_449c533f586939b6e5f246632a46421f.png) [@bakunin](https://community.unix.com/u/bakunin)\
**Post date:** [May 6, 2011, 8:49am UTC](https://community.unix.com/t/rpmdb-open-failed/286771/3 "2011-05-06T08:49:39Z")

</div>

That's essentially the same error as

```nohighlight
rpm -q <some_pkg>
rpmdb: Program version 4.3 doesn't match environment version
error: db4 error(-30974) from dbenv->open: DB_VERSION_MISMATCH: Database environment version mismatch
error: cannot open Packages index using db3 - (-30974)
error: cannot open Packages database in /var/lib/rpm
package <some_pkg> is not installed

```

The problem is a corrupted rpm database, mostly coming into existence because of an aborted update process. It also happens sometimes when the package containing rpm itself is updated.

The solution is to delete and then rebuild the database:

```nohighlight
# rm -f /var/lib/rpm/__db.[0-9][0-9]*
# rpm --quiet -qa

```

I hope this helps.

bakunin

---

<div class="post-metadata">

**Author:** ![sef\_alislam](https://community.unix.com/user_avatar/community.unix.com/sef_alislam/32/6908_2.png) [@sef\_alislam](https://community.unix.com/u/sef_alislam)\
**Post date:** [May 6, 2011, 11:55am UTC](https://community.unix.com/t/rpmdb-open-failed/286771/4 "2011-05-06T11:55:23Z")

</div>

ya,that's right
