LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-28-2003, 08:02 AM   #1
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Rep: Reputation: 45
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.
 
Old 12-28-2003, 03:18 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,750

Rep: Reputation: 271Reputation: 271Reputation: 271
"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
 
Old 12-28-2003, 04:57 PM   #3
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Original Poster
Rep: Reputation: 45
No, none of the 153 rpm package names look like garbage.

Same kind of errorr messages, main instance...
 
Old 12-28-2003, 05:26 PM   #4
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,750

Rep: Reputation: 271Reputation: 271Reputation: 271
"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
 
Old 12-28-2003, 06:24 PM   #5
ugge
Senior Member
 
Registered: Dec 2000
Location: Gothenburg, SWEDEN
Distribution: OpenSUSE 10.3
Posts: 1,028

Original Poster
Rep: Reputation: 45
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?
 
Old 12-28-2003, 07:12 PM   #6
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,750

Rep: Reputation: 271Reputation: 271Reputation: 271
"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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
fedora4 rpmdb? james.farrow Fedora 9 06-25-2005 07:08 PM
Help me to recover my rpmdb J_Szucs Linux - General 1 09-09-2004 10:39 AM
Linux Working ... Windows says corrupted Hard Drive ZenXIII Linux - Newbie 8 10-21-2003 02:43 AM
rpm --rebuilddb error init-5 Linux - Software 3 09-15-2003 11:48 PM
# rpm --rebuilddb -- Segmentation fault russell Linux - Software 4 08-14-2001 03:39 AM


All times are GMT -5. The time now is 09:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration