Click to See Complete Forum and Search --> : I think I messed up RPM


jdvilla
10-01-2003, 06:29 PM
Have any ideas on this:

I was poking around trying to install a bunch a RPMs when I accidentally deleted everything in /var/lib/rpm/ when I should have only deleted the __db* files in that directory...

Now when I try to rebuild the database I get,

[root@dolphin rpm]# rpm -vv --rebuilddb
D: rebuilding database /var/lib/rpm into /var/lib/rpmrebuilddb.3950
D: creating directory /var/lib/rpmrebuilddb.3950
D: opening old database with dbapi 3
D: opening db environment /var/lib/rpm/Packages joinenv
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
D: locked db index /var/lib/rpm/Packages
D: opening new database with dbapi 3
D: opening db environment /var/lib/rpmrebuilddb.3950/Packages create:mpool
D: opening db index /var/lib/rpmrebuilddb.3950/Packages create mode=0x42
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm/Packages
D: removed db environment /var/lib/rpm/Packages
D: closed db index /var/lib/rpmrebuilddb.3950/Packages
D: closed db environment /var/lib/rpmrebuilddb.3950/Packages
D: removed db environment /var/lib/rpmrebuilddb.3950/Packages
D: removing directory /var/lib/rpmrebuilddb.3950

but nothing like I am expecting (which is to watch the rpm database get rebuilt)

So, I tried to copy the files from another Red Hat 8 machine (/var/lib/rpm/* to my current machine) and then try and to rebuild the database from that. Well, my result is that I get the packages from the other machine, again not what I am expecting...

JohnT
10-01-2003, 07:06 PM
If I remember correctly you need the cd...the DB is built off the original install cd, or its equivalent.

jdvilla
10-03-2003, 01:53 PM
I tried doing an upgrade and using the rpmdb from the CD but now I get this

/usr/lib/rpm/rpmq: /lib/i686/libpthread.so.0: version `GLIBC_2.3.2' not found (required by /lib/librt.so.1)

JohnT
10-03-2003, 07:54 PM
Have you done a search for that version of libpthread.so.0 on your drive? If you can find it just add the location to your /etc/ld.so.conf file and run ldcongfig rom the terminal or just reboot. Libraries are not always where the rpm looks.

jdvilla
10-03-2003, 08:07 PM
I fixed it by doing a downgrade of the rpm package for glibc and that did the trick.