Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

fixing corrupted rpm database

Posted on 2003-03-11
3
Medium Priority
?
221 Views
Last Modified: 2013-12-15
Anyone know how to recover from an rpm install fail? I tried to do an upgrade on a package, it failed and did a core dump, and now it appears to have corrupted the rpm database. Any kind of rpm command just hangs.

THanks,
Skip Egley
0
Comment
Question by:egley
3 Comments
 
LVL 1

Accepted Solution

by:
splishsplash earned 500 total points
ID: 8117097
do you have any of these files?
/var/lib/rpm/__db*

if so, do this:

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

Here's a good link at to what the --rebuilddb
option actually does:
http://www.rpm.org/hintskinks/repairdb/
0
 
LVL 3

Expert Comment

by:jnbkze
ID: 8119045
if the rpm database is corrupt beyond repair or recovery then try:

rpm --initdb

This will create a new rpm database. I advise caution before simply creating a new rpm database
0
 

Author Comment

by:egley
ID: 8120990
Thank you very much, worked like a charm!

I would also like to thank the other person (sorry forgot your 'handle' and can't get back to the previous screen).

If I ever figure out how to split points, I would do that.

Skip Egley
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month11 days, 4 hours left to enroll

572 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question