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

Re: yum/rpm hosed me yesterday



Chuck Campbell wrote:
I installed yum on my rh9 box, and it looked like it was working.

At least yum check-updates showed a lot of packages for me to update.

I saw that rpm was on the list, so I did yum update rpm*

It went through all of its steps without errors, and I thought "this is
the best thing since sliced bread"

I did rpm -qa | grep rpm to verify the current version and I get this:
rpmdb: unable to join the environment
error: db4 error(11) from dbenv->open: Resource temporarily unavailable
error: cannot open Packages index using db3 - Resource temporarily unavailable (11)
error: cannot open Packages database in /var/lib/rpm


Now it appears I'm stuffed. What do I do next?

I got your message directed at me personally, Chuck, and I responded. For the sake of the others on the list, here's what I said:

It wasn't yum, it's RPM and its ongoing flubup with the database system.

Go into /var/lib/rpm and delete the __db.001 __db.002 and __db.003
(those start with two underscores).  Then, as root:

rpm --rebuilddb

and wait a while. That should fix it. A script to do it is:

--------------------------- CUT HERE ---------------------------------
#!/bin/bash
echo -n Cleaning up corrupted databases...
rm -f /var/lib/rpm/__db*
echo Done
echo
echo -n Rebuilding databases...
rpm --rebuilddb
echo Done
echo
echo RPM databases rebuilt
--------------------------- CUT HERE ---------------------------------

This has been an ongoing issue with rpm and the db3/db4 packages.  I
don't know if they'll ever sort it out.  If you ever get those kinds of
messages in the future, that's the fix.
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens vitalstream com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-    If Windows isn't a virus, then it sure as hell is a carrier!    -
----------------------------------------------------------------------



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