Bug 100772 - corrupt rpm database
Summary: corrupt rpm database
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: rpm
Version: 9
Hardware: i686
OS: Linux
medium
high
Target Milestone: ---
Assignee: Jeff Johnson
QA Contact: Mike McLean
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-07-25 07:32 UTC by Alan Henderson
Modified: 2007-04-18 16:56 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2003-07-29 13:03:25 UTC
Embargoed:


Attachments (Terms of Use)
Output from running "rpm -vv -rebuilddb" (152.95 KB, text/plain)
2003-07-25 07:38 UTC, Alan Henderson
no flags Details

Description Alan Henderson 2003-07-25 07:32:18 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.2.1) Gecko/20030225

Description of problem:
Many installed packages are not recogised and incorrect dependencies are
displayed when installing a package.

I have tried removing the stale locks and rebuilding the rpm database. But

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

This seems to run ok (see attachment)

take this installed package for example:-

henderson 8# rpm -ivh --test mp3blaster-3.1.3-1.i386.rpm
error: Failed dependencies:
        ld-linux.so.2 is needed by mp3blaster-3.1.3-1
        libc.so.6 is needed by mp3blaster-3.1.3-1
        libm.so.6 is needed by mp3blaster-3.1.3-1
        libpthread.so.0 is needed by mp3blaster-3.1.3-1
        libstdc++-libc6.2-2.so.3 is needed by mp3blaster-3.1.3-1
        libc.so.6(GLIBC_2.0) is needed by mp3blaster-3.1.3-1
        libc.so.6(GLIBC_2.1) is needed by mp3blaster-3.1.3-1
        libc.so.6(GLIBC_2.2.3) is needed by mp3blaster-3.1.3-1
        libm.so.6(GLIBC_2.0) is needed by mp3blaster-3.1.3-1
        libpthread.so.0(GLIBC_2.0) is needed by mp3blaster-3.1.3-1
        libpthread.so.0(GLIBC_2.1) is needed by mp3blaster-3.1.3-1

These items are definietly installed

henderson 9# locate libc.so.6
/lib/i686/libc.so.6
/lib/tls/libc.so.6
/lib/libc.so.6

I get a error checking the package database

henderson 15# db_verify Packages
db_verify: region error detected; run recovery.
db_verify: Old or incorrect DB version; extraneous errors may result
db_verify: DB->verify: Packages: DB_VERIFY_BAD: Database verification failed






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

How reproducible:
Always

Steps to Reproduce:
1. try to install a package
2. get overwhelming dependency errors
3.
    

Additional info:

Comment 1 Alan Henderson 2003-07-25 07:38:11 UTC
Created attachment 93140 [details]
Output from running "rpm -vv -rebuilddb"

Comment 2 Jeff Johnson 2003-07-29 13:03:25 UTC
Doing
    grep glibc output
indicates that your database does not have glibc installed.

Reinstall the glibc package so that dependencies can be found.

Harder to tell why db_verify is unhappy, but probably because
db-4.0.14 is not worward compatible with db-4.1.25.

Do instead
    cd /var/lib/rpm
    rm -f __db*
    /usr/lib/rpm/rpmdb_verify Packages

Comment 3 Alan Henderson 2003-07-30 00:19:10 UTC
The command   

/usr/lib/rpm/rpmdb_verify Packages   

does not yield any warning or error messages which implies that the database
looks OK. Somehow a large percentage of the database records has disapeared. I
have reinstalled some things (which now appear back in the rpm database) but
some packages have so many dependencies that I just use the --nodeps switch. 

The original question of why more than half of my database contents disapeared
remains a mystery.


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