Creating Rpm database

Mark Farmer farmerma at cromwell.co.uk
Wed May 4 11:19:42 UTC 2005


Michael Schwendt wrote:
> On Wed, 4 May 2005 11:10:04 +0200 , Padiyath Sreekumaran wrote:
> 
> 
>>   Hello,
>>   Iam having the following problem:
>>   #rpm -qa gave the following output
>>
>>error: cannot open Packages index using db3 - No such file or directory (2)
>>
>>   Then I did the following:
>>
>>   #mkdir /var/lib/rpm
>>   #rpm --initdb
>>   # ls -la /var/lib/rpm
>>total 24
>>drwxr-xr-x    2 root     root         4096 May  4 08:58 .
>>drwxr-xr-x   25 root     root         4096 May  4 08:57 ..
>>-rw-r--r--    1 root     root        24576 May  4 08:57 Packages
>>
>>
>>   When I execute "rpm -qa" I get no output.Iam missing a lot of information
>>in rpm directory.
> 
> 
> Right, the entire database is missing, and you initialised an empty
> one after creating the directory.
> 
> 
>>   How can I recreate it? 
> 
> 
> Restore the files from your backups.
> 

You could try rpm --rebuilddb
That should build a new database

-- 
Mark Farmer
Linux System Administrator

___________________________________________________ 
  
This email is intended for the named recipient. The information contained 
in it is confidential.  You should not copy it for any purposes, nor 
disclose its contents to any other party.  If you received this email 
in error, please notify the sender immediately via email, and delete it from
your computer. 
  
Any views or opinions presented are solely those of the author and do not 
necessarily represent those of the company. 
  
Registered Office: PO Box 14, Chartwell Dr, Wigston, Leicester. LE18 1AT 
__________________________________________________




More information about the redhat-list mailing list