Corrupted rpmdb - --rebuilddb not working
Hi!
Recently my rpmbdb was corrupted for unknown reason. I have tried to rebuild my database using rpm --rebuild This won't work it starts working but encounters problems. My rpm gives me error messages in Swedish but will give an approximate translation of them here. error: rpmbd: corrupt main instance #451 fetched, skipping ... *** dbiUpdateRecord: uh is NULL Segmentation fault (core dumped) My question is what's the difference between --rebuilddb and --initdb? I'm using Red Hat 7.1 with an upgraded rpm to packet-version 4. This error prevents me from doing installations. When trying to install I get an error db->verify: DB_VERIFY_BAD: Database verification failed. |
"My question is what's the difference between --rebuilddb and --initdb?"
I think that --initdb creates a new, empty data base. "*** dbiUpdateRecord: uh is NULL" I think that there is at least one entry in your rpm data base that contains garbage. I suggest that you run: rpm -qa | sort > /root/all.rpms.txt to create a file with every rpm package name in it. Read through the file to see if any of the package names look suspiciously like garbage. ___________________________________ Be prepared. Create a LifeBoat CD. http://users.rcn.com/srstites/LifeBo...home.page.html Steve Stites |
No, none of the 153 rpm package names look like garbage.
Same kind of errorr messages, main instance... |
"No, none of the 153 rpm package names look like garbage."
153 seems like a short list. I have 763 and I have had systems in the past with over 1000 packages. It is possible that you have rpm package names that cannot be displayed because the data base is screwed up? ___________________________________ Be prepared. Create a LifeBoat CD. http://users.rcn.com/srstites/LifeBo...home.page.html Steve Stites |
I agree it seems very few.
It might be due to the rpm database being corrupt. The thing is how do I repair or make a new one without losing all? |
"The thing is how do I repair or make a new one without losing all?"
I do not know how to repair your rpm data base. What I suggest that you do is start a new rpm data base and also leave the old one like it is. You can create a second rpm data base with: rpm --initdb --dbpath=/new/rpm/data/base Then install all new rpms in the new rpm data base using: rpm --dbpath=/new/rpm/data/base -if /somepath/packagename.rpm This will allow you to install new packages. When you upgrade a package, try removing the package from the old data base before you install the new package. What I am suggesting will only partially solve your problem. I don't know how to retrieve the lost names from your old rpm data base and copy those names into the new rpm data base. ___________________________________ Be prepared. Create a LifeBoat CD. http://users.rcn.com/srstites/LifeBo...home.page.html Steve Stites |
All times are GMT -5. The time now is 10:03 PM. |