Creating Rpm database

Michael Schwendt fedora at wir-sind-cool.org
Wed May 4 12:04:49 UTC 2005


On Wed, 04 May 2005 12:19:42 +0100, Mark Farmer wrote:

> 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

No, it won't do that in this case. The manual page contains a hint why it
won't work.




More information about the redhat-list mailing list