Red Hat This forum is for the discussion of Red Hat Linux. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-09-2004, 07:26 AM
|
#1
|
LQ Newbie
Registered: Jun 2004
Posts: 16
Rep:
|
rpmdb problem
hi all:
my rpmdb is not working ...
rpm -qa has no output.
How to solve this?
some outputs:
---
[root@gateway rpm]# ls
Basenames __db.001 __db.002 __db.003 Name Packages Providename Pubkeys
[root@gateway rpm]# rpm -qa
[root@gateway rpm]#
-----------------
Thanks
nisp
|
|
|
06-09-2004, 09:35 AM
|
#2
|
Member
Registered: Sep 2003
Location: Chiangmai, Thailand
Posts: 53
Rep:
|
Hi,
(All information are from RH9 distribution)
Very strange. Try to rebuild your rpm database
Login as root :
rpmbuild --rebuilddb
You can delete first in /var/lib/rpm the 3 files __db*. No worry
Be sure that there is no other rpm process running. Kill them before if necessary (kill -9 )
ps -ef | grep rpm
Hope this helps.
Philippe
|
|
|
06-10-2004, 06:14 AM
|
#3
|
LQ Newbie
Registered: Jun 2004
Posts: 16
Original Poster
Rep:
|
Hi
removed __db* all files
and did:
rpm --rebuilddb
no luck.... it just takes less than 1 sec.....
-----
[root@gateway rpm]# rpm --rebuilddb
[root@gateway rpm]#
--------------------------
[root@gateway rpm]# rpm -qa
[root@gateway rpm]#
---
when i do : rpmbuild --rebuilddb
it says:
---
root@gateway rpm]# rpmbuild --rebuilddb
--rebuilddb: unknown option
--------------
Thanks
Paras
|
|
|
06-17-2004, 11:20 AM
|
#4
|
LQ Newbie
Registered: Jun 2004
Location: Sweden
Distribution: RedHat 8
Posts: 4
Rep:
|
rpm db problem
I have the same problem, "run database recovery".
I deleted the __db files.
Then I ran the "rpm -qa", I saw a lot of application names scrolling by, but at the end there were some errors:
error: rpmdbNextIterator: skipping h# 933 Header V3 DSA signature: BAD, key ID db42a60e
rpmdb: page 949: illegal page type or format
rpmdb: PANIC: Invalid argument
rpmdb: /var/lib/rpm/Packages: pgin failed for page 949
error: db4 error(-30981) from dbcursor->c_get: DB_RUNRECOVERY: Fatal error, run database recovery
error: db4 error(-30981) from dbcursor->c_close: DB_RUNRECOVERY: Fatal error, run database recovery
error: db4 error(-30981) from db->close: DB_RUNRECOVERY: Fatal error, run database recovery
error: db4 error(-30981) from db->close: DB_RUNRECOVERY: Fatal error, run database recovery
error: db4 error(-30981) from dbenv->close: DB_RUNRECOVERY: Fatal error, run database recovery
Running "rpm -qa" again gives me:
rpmdb: region error detected; run recovery.
error: db4 error(-30981) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 - (-30981)
error: cannot open Packages database in /var/lib/rpm
no packages
So, what next?
I can't update my programs :-(
/Kent
|
|
|
06-18-2004, 05:00 AM
|
#5
|
Member
Registered: Sep 2003
Location: Chiangmai, Thailand
Posts: 53
Rep:
|
Hi ,
Removing only the __db files does not help. You must follow the steps given below.
Login as root :
Be sure that there is no other rpm process running. Kill them before if necessary (kill -9 )
ps -ef | grep rpm
Delete first in /var/lib/rpm the 3 files __db*. No worry
rpmbuild --rebuilddb
Hope this helps, as I never had this king of error message.
Philippe
|
|
|
06-18-2004, 05:32 AM
|
#6
|
LQ Newbie
Registered: Jun 2004
Location: Sweden
Distribution: RedHat 8
Posts: 4
Rep:
|
Thanks, didn't help
[root@mail root]# ps -ef | grep rpm
root 2138 2097 0 12:27 pts/0 00:00:00 grep rpm
[root@mail root]# rm /var/lib/rpm/__db*
rm: remove regular file `/var/lib/rpm/__db.001'? y
rm: remove regular file `/var/lib/rpm/__db.002'? y
rm: remove regular file `/var/lib/rpm/__db.003'? y
[root@mail root]# rpmbuild --rebuilddb
--rebuilddb: unknown option
[root@mail root]# cd /var/lib/rpm
[root@mail rpm]# rpmbuild --rebuilddb
--rebuilddb: unknown option
[root@mail rpm]#
|
|
|
06-18-2004, 05:46 AM
|
#7
|
Member
Registered: Sep 2003
Location: Chiangmai, Thailand
Posts: 53
Rep:
|
Quote:
root@mail root]# rpmbuild --rebuilddb
--rebuilddb: unknown option
|
Sorry, try :
[root@p4 root]# rpm --rebuilddb
error: db4 error(16) from dbenv->remove: Device or resource busy
Should work much better, and take about 3 to 5 mn.
The error message is "normal" .
Philippe
|
|
|
06-18-2004, 07:26 AM
|
#8
|
LQ Newbie
Registered: Jun 2004
Location: Sweden
Distribution: RedHat 8
Posts: 4
Rep:
|
Doesn't work either
It takes less than one second, no error message at all.
The only thing that gives output is to use -vv, but still not working:
[root@mail root]# rpm -vv --rebuilddb
D: rebuilding database /var/lib/rpm into /var/lib/rpmrebuilddb.2285
D: creating directory /var/lib/rpmrebuilddb.2285
D: opening old database with dbapi 3
D: opening db environment /var/lib/rpm/Packages create:cdb:mpool
D: opening db index /var/lib/rpm/Packages rdonly mode=0x0
D: locked db index /var/lib/rpm/Packages
D: opening new database with dbapi 3
D: opening db environment /var/lib/rpmrebuilddb.2285/Packages create:mpool
D: opening db index /var/lib/rpmrebuilddb.2285/Packages create mode=0x42
D: closed db index /var/lib/rpm/Packages
D: closed db environment /var/lib/rpm/Packages
D: removed db environment /var/lib/rpm/Packages
D: closed db index /var/lib/rpmrebuilddb.2285/Packages
D: closed db environment /var/lib/rpmrebuilddb.2285/Packages
D: removed db environment /var/lib/rpmrebuilddb.2285/Packages
D: removing directory /var/lib/rpmrebuilddb.2285
[root@mail root]#
It recreates the __db files, but they seems to be empty, "rpm -qa" gives nothing at all. So they need to be "populated" with info about my installed programs....
|
|
|
06-18-2004, 07:33 AM
|
#9
|
Member
Registered: Sep 2003
Location: Chiangmai, Thailand
Posts: 53
Rep:
|
man rpm give this :
The general form of an rpm rebuild database command is
rpm {--initdb|--rebuilddb} [-v] [--dbpath DIRECTORY] [--root DIRECTORY]
Use --initdb to create a new database, use --rebuilddb to rebuild the
database indices from the installed package headers.
I think that using the --initdb could maybe work. Sorry but I have no more idea afterthis ;-)
Hope this helps,
Philippe
|
|
|
06-18-2004, 07:40 AM
|
#10
|
LQ Newbie
Registered: Jun 2004
Location: Sweden
Distribution: RedHat 8
Posts: 4
Rep:
|
Works!
RedHat 8.0 had some files in the /usr/bin I wasn't aware of (db_verify, dup, load).
No it seems to be OK again.
Thanks for the help!
|
|
|
All times are GMT -5. The time now is 10:54 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|