I'm not sure who told you to use the
--add-repo switch but this is almost never the "right" way to go about adding new repositories. Rather you should either use a
.rpm file for the repository that you're attempting to install, and use
rpm -ivh somerepo.rpm to install that repositories
.repo file into the directory
/etc/yum.repo.d/ and the RPM keys visible when you run the command
rpm -qa gpg-pubkey*.
$ rpm -qa gpg-pubkey*
You can also make a repository file manually for Chrome using one of these 2 samples that are described in this ifthenelse blog post titled: Enable Google YUM repository.
name=google-chrome - 32-bit
name=google-chrome - 64-bit
This would've saved you the pain you're in now. But back to resolving that now.
Diagnosing with RPM
You can use RPM to determine which RPMs have been impacted, I'd focus on RPMs that are related to installing
.repo files to start, as well as packages related to
yum itself, since I suspect your
/etc/yum.conf file or the lower level
.repo files are at fault here.
You can check the consistency of files comparing their checksum that's maintained in the RPM database like so:
$ rpm -qfVv /etc/yum.conf /etc/yum.repo.d/*
......... c /etc/logrotate.d/yum
......... c /etc/yum.conf
......... c /etc/yum/version-groups.conf
This output shows whether any files associated to the RPM that
/etc/yum.conf has been modified or is corrupt. If a file had been modified the output would look like this:
$ touch /etc/yum.conf
$ rpm -qfVv /etc/yum.conf
......... c /etc/logrotate.d/yum
.......T. c /etc/yum.conf
T in the column of dots to the left. This tells us that the time on the file differs. See the man page for
rpm for more on the
Each of the 9 characters denotes the result of a comparison of attribute(s) of the file to the value of those attribute(s) recorded in the database. A single
"." (period) means the test passed, while a single "?" (question mark) indicates
the test could not be performed (e.g. file permissions prevent reading).
Otherwise, the (mnemonically emBoldened) character denotes failure of the corresponding
S file Size differs
M Mode differs (includes permissions and file type)
5 digest (formerly MD5 sum) differs
D Device major/minor number mismatch
L readLink(2) path mismatch
U User ownership differs
G Group ownership differs
T mTime differs
P caPabilities differ
You'll likely need to re-download the offending RPM and re-install it using
Are my repositories disabled?
You can use this command to confirm that the adding of the Chrome YUM repository didn't accidentally delete the other YUM repositories. This command will do it:
screenshot of output
$ yum repolist all
Notice the column to the right. Any repos that are disabled are red, any that are enabled are green. Check to make sure that all the repos are enabled (green).
If they aren't then you can either go through the
.repo files and changed the offending ones to "ENABLED=1" or use
yum-config-manager to re-enable them.
$ sudo yum-config-manager --enable <repo name>
I'm stuck...my .repo files are "hosed"???
If you find that your
.repo files are in a bad way. Perhaps they're zero length files now, then your yum setup is essentially pretty screwed up. But all is not lost. You can get things back into shape using
Can't I just re-install RPMs?
Yes you can, but which to install? If you don't know which ones to install you can deduce the versions like so, using your existing RPM database. I'm on F19 so these are the corresponding packages for the
$ rpm -qf /etc/yum.repos.d/fedora* | sort -u
So you're looking for an
.rpm file named
fedora-release-20*.noarch. Here's that file from the install media for F20:
$ rpm -Fvh http://dl.fedoraproject.org/pub/fedora/linux/releases/20/Fedora/$(uname -p)/os/Packages/f/fedora-release-20-1.noarch.rpm
For the RPMFusion repos you can do the same thing:
$ sudo rpm -qf /etc/yum.repos.d/rpmfusion-* | sort -u
So you're looking for
.rpm files named
rpmfusion-nonfree-release-20*.noarch. Here are those files from the RPM Fusion website:
$ sudo rpm -Fvh http://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-20.noarch.rpm
$ sudo rpm -Fvh http://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-20.noarch.rpm
Re-adding the fedora-release repo
An alternative method would be to use the command
yum-config-manager to re-add the
$ sudo yum-config-manager --add-repo=http://download.fedoraproject.org/pub/fedora/linux/updates/testing/20/$(uname -p)/
NOTE: This command will install the appropriate 32-bit or 64-bit repository based on your system's architecture using
Another method for getting things repaired is to use the
$ sudo yum reinstall fedora-release
NOTE: This method will likely repair other repositories such as the
fedora-updates repos, but requires at least a partially working install of the
fedora repo, so it's a bit of a "catch 22". I would suggest running this command after you've the items in step #1 & #2 above.