sábado, 19 de mayo de 2012

How to fix a corrupted RPM database

The first time I had a problem with a corrupted RPM database was when I installed Mandriva 2011 to my daughter's computer.  No matter what I did, the Mandriva Control Center would refuse to fetch packages and would throw an error message to my face.

In desperation, I looked for help and found it in one thread posted in one of Mageia's forum.  The post described how to solve the situation easily with the help of Konsole.  I can't find that original post, but found this one, which gives the same information.

So far, I have used the process to fix that Mandriva 2011 RPM database and one in Mageia's Betas.

I even had to use it three weeks ago in my last Mandriva 2010.2 installation, when the Mandriva repositories went down and I made some stupid mistakes while adding repos.

Since the process is so useful, I'm going to post it here in case someone needs it:

1.  Open Konsole and type su
2.  Type your root password
3.  Write rm -f /var/lib/rpm/__db*
4. Now you need to rebuild the database, so write  rpm --rebuilddb
5. You can now close Konsole and open the control center to add the repositories from the GUI.  Of course, you can do that with the terminal, too.

If you run PCLinuxOS and happen to hit the same problem, Texstar wrote a detailed forum post about what to do.  You can check it here.


You can always find good help if you are willing to read a bit.

2 comentarios:

And the Magic is Ready!

Two weeks ago, DistroWatch reported that Mageia 9 had been released. Back then, I was swamped with work and, even when the Mageia notifier ...