LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-16-2009, 01:57 AM   #1
harris4got
LQ Newbie
 
Registered: Oct 2009
Posts: 12

Rep: Reputation: 0
Rebuilding /var/lib/rpm/Packages


Hello

I found my Fedora 10 system's "/var/lib/rpm/Packages" file got deleted. After running the "rpm --rebuilddb" command, it creates "Packages(12 KB in size) along with three __db.*" files but "rpm -qa" command is not showing any package list.

Is there any way to recreate the "/var/lib/rpm/Packages" from scratch without reinstalling the OS?..

Any help is appreciated.

Last edited by harris4got; 10-16-2009 at 01:59 AM.
 
Old 10-16-2009, 08:25 PM   #2
Forrest Coredump
Member
 
Registered: Oct 2009
Location: Southwestern United States
Distribution: Redhat Enterprise Linux 4-5 (Current RHCE), Fedora Core 11 (FC11), Arch Linux, BT3 (Current GCIH)
Posts: 42

Rep: Reputation: 19
No sweat... Just re-initialize the database (actually build from scratch).

rpm -v --initdb
 
Old 10-18-2009, 11:14 PM   #3
harris4got
LQ Newbie
 
Registered: Oct 2009
Posts: 12

Original Poster
Rep: Reputation: 0
Error on rpm -v --initdb

Thanx for the reply but this is what happens on rpm -v --initdb

Code:
# rpm -v --initdb
rpmdb: PANIC: fatal region error detected; run recovery
error: db4 error(-30975) from dbenv->open: DB_RUNRECOVERY: Fatal error, run database recovery
error: cannot open Packages index using db3 -  (-30975)
 
Old 10-22-2009, 11:17 AM   #4
Forrest Coredump
Member
 
Registered: Oct 2009
Location: Southwestern United States
Distribution: Redhat Enterprise Linux 4-5 (Current RHCE), Fedora Core 11 (FC11), Arch Linux, BT3 (Current GCIH)
Posts: 42

Rep: Reputation: 19
I would blow away your existing db files;

[root@shell]# rm -f /var/lib/rpm/__db*

And rebuild the rpm database;

[root@shell]# rpm --rebuilddb

The above should do the trick...
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
warning: cannot get exclusive lock on /var/lib/rpm/Packages Raafi Fedora 3 03-06-2005 03:45 AM
Moving /var/adm and /var/lib - why does it hurt? J_Szucs Linux - General 1 09-15-2004 06:46 PM
error: cannot get exclusive lock on /var/lib/rpm/Packages orly Linux - Software 2 09-06-2004 07:13 AM
error:cannot get exclusive lock on /var/lib/rmp/packages mateka Linux - Newbie 1 06-26-2004 10:07 PM
error: cannot get exclusive lock on /var/lib/rpm/Packages error: cannot open Packages inward_eye Linux - Software 3 08-24-2003 03:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:11 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration