yum/rpm hosed me yesterday
Chuck Campbell
campbell at accelinc.com
Thu May 6 20:40:11 UTC 2004
On Thu, May 06, 2004 at 01:07:52PM -0700, Rick Stevens wrote:
> 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.
Great, this worked fine. I'm back in business.
-chuck
More information about the Redhat-install-list
mailing list