3

I accidentally deleted all my RPM data (I removed /var/lib/rpm/* instead of /var/lib/rpm/__*), and then ran rpm --rebuilddb. Now when I try to run yum update I get:

Could not parse metalink https://mirrors.fedoraproject.org
/metalink?repo=fedora-$releasever&arch=i386 error was
No repomd file
Error: File /var/cache/yum/i386/$releasever/fedora/metalink.xml does 
not exist

I found that I don't even have the /var/cache/yum/i386 folder anymore after the previous operation. I downloaded the fedora-release RPM of Fedora 18 and locally installed and rebuilt my yum cache (is that what i did?):

rpm -Uvh --replacefiles --replacepkgs /$MYPATH_TO_Fedorareles/fedorarelease-18-0.8.noarch.rpm

This made a new rpmdb where only one package is installed: fedora-release. Since yum thinks that's the only package installed, if I try to install anything it resolves the dependencies and queues lots of packages for install that I actually already have installed.

How do I make yum aware of all the packages that are already installed? I don't want to reinstall anything, and I don't want to download 500MB of RPMs.

0

1 Answer 1

3

Unfortunately you are going to have to repopulate the rpmdb, and you can only do that if you have the RPMs itself. You can pass --justdb to rpm when performing a package install/update/erase, but you will need the actual package available.

1
  • 1
    Just make absolutely sure that the packages really are there.
    – vonbrand
    Jan 25, 2013 at 0:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .