LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   [HELP] RPM Dababase Repair! (https://www.linuxquestions.org/questions/linux-general-1/%5Bhelp%5D-rpm-dababase-repair-41921/)

jpsrm 01-18-2003 08:26 AM

[HELP] RPM Dababase Repair!
 
I was executing some RPM command that was using RPM Database, and the process get stuck so I decided to kill it!

Since then my RPM system has been damage!

I can't install, verify, upgrade anything with RPM... RPM simply doesn't work...

Some ERRORS:
--------------------------------------------------------------------------------
#rpm -qa
(only about 10 pakages are outputed...)

#rpm -ivh file.rpm
warning: file.rpm: V3 DSA signature: NOKEY, key ID db42a60e
1:file ########################################### [100%]
--------------------------------------------------------------------------------

I read all the faqs and help from http://www.rpm.org/ but nothing worked...
I also tryied to install RPM from TAR (since RPM can't install anything...) but It didn't work...

I followed all instructions on RPMs HELP site ( http://www.rpm.org/hintskinks/repairdb/ ) about recovering RPM Database but it didn't work too.

What I did:
--------------------------------------------------------------------------------
# rm -f /var/lib/rpm/__db*

# cd /var/lib
# tar czvf /tmp/rpmdb.tar.gz rpm

# cd /var/lib/rpm
# db_verify Packages

# mv Packages Packages-ORIG
# db_dump Packages-ORIG | db_load Packages

# rpm -qa

# rpm --rebuilddb
--------------------------------------------------------------------------------


HELP from http://www.rpm.org/:
--------------------------------------------------------------------------------
Q. I can't upgrade any packages, run up2date or rpm. What is wrong?

A. The RPM database sometimes gets stuck. One cause of this problem is when a process working on the RPM database is killed, which leaves lock files in place, limiting what further processes can do to the database. So, a word to the wise: make sure such a process really is stuck before killing it - if a process is using much CPU time (eg. as reported by top) it is probably still doing useful work.
--------------------------------------------------------------------------------


Thanks in advance!!!

unSpawn 01-18-2003 09:43 AM

Explanation: http://www.redhat.com/docs/manuals/l...rpm-using.html , then rpm --import <key file>, where <key file> are those of Red Hat and any other source you install RPM's from.

jpsrm 01-18-2003 10:09 AM

Thanks for the tip! I'll read all carefully and I'll try to fix it :D


All times are GMT -5. The time now is 01:05 PM.