YUM Errors !!

Rick Stevens rstevens at vitalstream.com
Wed Feb 21 18:15:55 UTC 2007


On Tue, 2007-02-20 at 18:39 -0500, Micros50 wrote:
> On Mon, 2007-02-19 at 09:44 -0800, Rick Stevens wrote:
> > On Sat, 2007-02-17 at 17:11 -0500, mylar wrote:
> > > Hello, I recently installed FC6 on my machine to replace an aging
> > > version of FC1. Thus far everything has gone well and I am very pleased
> > > with the performance of FC6 as well as it's many improvements over FC1.
> > > Quite naturally I have been using yum to perform package updates as well
> > > as to install additional packages that I need for my day to day work.
> > > 
> > > That said I have recently run into a little problem when doing
> > > installations and updates with yum. The installation or update works
> > > fine, the proper packages get updated and/or installed but, I am also
> > > getting a bunch of error messages spit out at the end of each run if
> > > yum.
> > > 
> > > The error message states:
> > > 
> > > "db4 error(-30987) from dbcursor->c_get: DB_PAGE_NOTFOUND: Requested
> > > page not found."
> > > error:error:(-30897) getting "" records from Requireversion index".
> > > 
> > > Okay, anyone know what this means. The package or update gets done fine
> > > but this message gets spit out a dozen times or more. Someone told me
> > > that the rpm database is probably corrupt and that I should run "rpm
> > > --rebuilddb". Any ideas if this will work ??
> > 
> > It can't hurt.  Here's the commands (as root, of course):
> > 
> > 	# cd /var/lib/rpm
> > 	# rm -f __db*
> > 	# rpm --rebuilddb
> > 
> > That's two underscore characters before the "db" in the second command.
> > In fact you may not want to use the "-f" option, but delete each file
> > itself.  There will be three or four of them, depending on how many
> > updates you've done.
> > 
> > Note that the rpm command will take a while to complete, so don't panic.
> 
> Hi Rick.. Thanks for the help. I did a
> 
> # rpm --rebuilddb
> 
> and that seemed to correct the problem. However, when i did it I forgot
> to remove the "__db*" files.  Should I have removed them first ?
> Everything seems to be working fine now I can install or update via rpm
> and yum, but I wonder if perhaps I should still do a
> 
> # rm -f __db*
> # rpm --rebuilddb
> 
> or should I leave everything alone at this point since it is working ? I
> am inclined to leave well enough alone at this point and go through the
> 3 steps in the event I experience such problems again.

If it fixed the problem, no, don't worry about deleting the db files.

There is a failure mode where the db files are so corrupt that rpm can't
fix them.  When that happens, you must delete the db files and run the
"--rebuilddb".  Because you really don't know when you need to do that,
I always delete them.  In actual fact, I wrote an "SLS" (stupid little
script) that does it:

	[root at prophead ~]# ls -l /usr/local/bin/fixrpmdb
	-rwxr-xr-x 1 root root 345 Jan 22  2004 fixrpmdb

	[root at prophead ~]# cat /usr/local/bin/fixrpmdb
	#!/bin/bash
	# fixrpmdb - Clean up RPM database weirdness
	# Rick Stevens, VitalStream, Inc., 22 January 2004
	# First, delete the RPM database files since they may be
	# beyond help...
	rm -f /var/lib/rpm/__db.*
	# Now, rebuild the RPM database...
	echo -n "Rebuilding RPM database, do NOT interrupt..."
	rpm --rebuilddb
	echo "Rebuild complete"
	exit 0

Feel free to use it.

----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens at vitalstream.com -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-  Jimmie crack corn and I don't care...what kind of lousy attitude  -
-                 is THAT to have, huh?   -- Dennis Miller           -
----------------------------------------------------------------------




More information about the Redhat-install-list mailing list