Help - Search - Members - Calendar
Full Version: Help To Rebuild Rpm Db / Up2date Not Responding
Linuxhelp > Support > Technical Support
thejackal13
Trying to rebuild rpm data base because:

I am trying to run Red Hat's up2date, but it just keeps hanging up and freezing. It also hangs up or freezes when i just click the alert icon. It kept haning up so first I went to red hat and just FTP all the new updates to my up2date spool. That got me a little farther in the update process but now it still hangs at the retrieving file stage. So then i read up on it and red hat recommened rebuilding the data base. So I followed there directions:

---------------------------------------
To fix this problem, run the following commands as root:

* kill all RPM processes (rhn_check, up2date, rpm, rhn-applet):
$ ps -axwww | grep rhn_check
In the list of processes, the first number on each line is the PID. For all PIDs listed except for the one associated with grep:
$ kill -9 <PID>
Repeat the above steps for each of the programs listed.

* remove any RPM lock files (/var/lib/rpm/__db*):
$ rm -rf /var/lib/rpm/__db*

* rebuild the rpm database:
$ rpm --rebuilddb
--------------------------------------------

but i get this:
[root@jackalhost root]# rpm --rebuilddb
error: db4 error(16) from dbenv->remove: Device or resource busy


but i can't kill that one. So I just follow along with the directions and i get that error (device busy)!

Please help me rebuild my data base, or beable to kill that process to rebuild. I also have a laptop with linux on it, is there anything i can take of that and replace a damage file on this computer with? Like the package file or anything like that?
hughesjr
Try rebooting the laptop ... if the db4 rpms are changed, sometimes a restart of the computer is necessary. I just had a similar problem with Fedora Core 1 ....

then try rpm --rebuilddb again
thejackal13
i have tried rebooting then doing it, even before loading gnome or kde. Going into command line right at the login screen.
hughesjr
I just checked ... and I have exactly the same problem with RH 9.0 and the latest updates ... that is the error error: db4 error(16) from dbenv->remove: Device or resource busy. I will do some research, but I found that it is normal for a rebuild right now.

Can you do this command as root:

rpm -qa | grep kernel

-------------------------------------
-------More stuff added -------
-------------------------------------

Here are some threads that say it's normal and not dangerous:
http://www.linuxquestions.org/questions/ar...2003/04/3/43802
https://listman.redhat.com/archives/shrike-...l/msg03649.html
chrisw
you have to be in the /var/lib/rpm directory i believe...
wherever you deleted the files you mentioned...
you need to be in that directory and then
run rpm --rebuilddb

i had this same issue while back and found
that it ran successfull after i ran the command
in the directory i mentioned earlier
thejackal13
Thanks for the options, I tried those and even some more. Nothing seemed to work. You are right that error is normal, but for some reason RHN still didn't respond. So i just reinstalled Red Hat. Thanks for you help.
thejackal13
Nothing worked, so reinstalled then downloaded the updates through an ftp then manually installed them. Then manually installed a new kernel, and things seem to be a lot better now.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2017 Invision Power Services, Inc.