Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 158666 - rpm looks in /usr/lib/rpmdb for rpmdb files instead of /var/lib/rpm
Summary: rpm looks in /usr/lib/rpmdb for rpmdb files instead of /var/lib/rpm
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: 4
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Paul Nasrat
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2005-05-24 18:18 UTC by James Bourne
Modified: 2007-11-30 22:11 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-08-25 18:23:02 UTC


Attachments (Terms of Use)

Description James Bourne 2005-05-24 18:18:36 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.0.4-1.3.1 Firefox/1.0.4

Description of problem:
When upgraded packages directly using RPM I receive the message:
rio:-bash# rpm -Fvh openoffice.org-*
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)
warning: cannot open Solve database in /usr/lib/rpmdb/i386-redhat-linux/redhat
error: Failed dependencies:
        libjawt.so.6 is needed by openoffice.org-core-1.9.104-1.i386

Ignoring the failed dependencies line, RPM is attempting to use the rpmdb in /usr/lib/rpmdb/ (obviously) instead of the rpmdb in /var/lib/rpm/.

If I remove the /usr/lib/rpmdb (rename to .bak) rpm creates a new empty database.  previous updates have used the rpmdb in /var/lib/rpm/



Version-Release number of selected component (if applicable):
rpm-4.4.1-20

How reproducible:
Always

Steps to Reproduce:
1. Update/install packages with dependency issues (in this case openoffice.org in rawhide needs libjawt.so.6 (which was replaced in libgcj with libgcjawt) and causes a dependency problem)


  

Actual Results:  rpm fails with db version issue.

Expected Results:  rpm should complain about dependency issue and exit.

Additional info:

The files in /usr/lib/rpmdb don't seem to be getting updated only read from occasionally.  If I move /usr/lib/rpmdb/i386-redhat-linux/redhat to redhat.bak and replace it with a symlink to /var/lib/rpm the issue goes away.

This will be a major problem with clients who are unable to troubleshoot it on their own.  I think it's just two alias lines in /usr/lib/rpm/rpmpopt-4.4.1 that require changing that reference /usr/lib/rpmdb/

Comment 1 Jeff Johnson 2005-05-24 18:23:57 UTC
This will "fix"
    rm -f /usr/lib/rpmdb/i386-redhat-linux/redhat/__db*

Probably better is to do
    rpm -e rpmdb-redhat
or
    rpm -e rpmdb-fedora

since Fedora Core has decided to not produce the rpmdb-fedora package anymore.

Comment 2 Paul Nasrat 2005-05-24 21:30:12 UTC
Anaconda upgrades will now remove rpmdb-fedora on upgrade.

Comment 3 mrgalvin 2005-07-01 05:29:09 UTC
With FC4 I get the same error:

 rpm -Fvh xine-0.99.3-4.2.fc4.i386.rpm
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
warning: xine-0.99.3-4.2.fc4.i386.rpm: Header V3 DSA signature: NOKEY, key ID
e42d547b
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 database in /var/lib/rpm

Looked into Comment #1.  Comment #2 must be true.

Comment 4 Jared Stemen 2005-07-14 23:23:09 UTC
I'm also getting a similar error when I try to update my system with apt-get
upgrade, and the above fixes don't seem to work.  It seemed to start happening
right after I installed, or tried to install, a new version of rpm.  Please help.

[root@localhost redhat]# apt-get upgrade
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
E: could not open RPM database

Comment 5 Jared Stemen 2005-07-15 00:21:33 UTC
You can disreguard my problem.  It seemed to be fix with a reboot

Comment 6 Jeff Johnson 2005-08-25 18:23:02 UTC
This problem appears resolved (by removing rpmdb-foo)


Note You need to log in before you can comment on or make changes to this bug.