Bug 100772 - corrupt rpm database
corrupt rpm database
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: rpm (Show other bugs)
9
i686 Linux
medium Severity high
: ---
: ---
Assigned To: Jeff Johnson
Mike McLean
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2003-07-25 03:32 EDT by Alan Henderson
Modified: 2007-04-18 12:56 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2003-07-29 09:03:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


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

  None (edit)
Description Alan Henderson 2003-07-25 03:32:18 EDT
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 03:38:11 EDT
Created attachment 93140 [details]
Output from running "rpm -vv -rebuilddb"
Comment 2 Jeff Johnson 2003-07-29 09:03:25 EDT
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-29 20:19:10 EDT
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.