Re: Corrupted rpmdb recovery

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday 06 February 2006 09:33, Ovidiu Lixandru wrote:
> Hi,
>
> I've got a FC4 system. While doing an yum update today, the power was
> cut. Upon booting the machine again and trying to resume the update, yum
> complained about a corrupted db.
> I initially tried "rm -f /var/lib/rpm/__db*". Nothing. Moved onto "rpm
> --rebuilddb". Only ~100 packages made it back into the db from the total
> of 1000+.
> Upon googling around, I found out about rpm --justdb. My
> /var/log/rpmpkgs file is intact, all the previously installed files are
> in it. But upon running "rpm --justdb --notriggers --noscripts -Uvh
> /var/log/rpmpkgs", rpm complains (of course) about the missing rpm
> files. Is there any way of automatically downloading the required files
> and serving them to rpm? yum --downloadonly seems to have vanished, too.
> I'd be most grateful for your suggestions.
> TIA

I gave this advice for recovery before and may well work for you.
What I suggested; 
--->First read the man and info pages for these commands so you <---
--->understand what is being done (if you already don't ).<----

You can force updates and installs 

->rpm -Uvh --force --nodeps filename.rpm

If that doesn't work  move each into a clean directory
(I.E. mkdir 1 etc.), then;

->rpm2cpio libbeecrypt6-4.1.2-9.1_10.rhfc4.at.i386.rpm | cpio -iv 
--make-directories .  #note '.' for current dir.

->mv -f  file /to/the/proper/dir 
# the rpm2cpio will make subdirectories in the 'clean' directories you made.

After all this fun then you need to go back and;

->rpm -Uvh --force --nodeps filename.rpm 
# to cause rpm to recognize that the package is installed.

->rpm --rebuilddb
( There are possibly simpler ways but this does work-- I have done this myself 
to fix rpm -the package manager, yum and apt-get from a broken version 
upgrade)

Anyone have a better way I would like to hear it also.
-- 
John Ludwig


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux