While trying to enable epel I somehow broke the repolist

epelfedora

I originally posted this on stack overflow and was told this was the better place to ask:

I made the attempt at enabling EPEL on my Fedora 22 machine by running

wget http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm

Then

sudo rpm -ivh epel-release-7-5.noarch.rpm

And now when I run

dnf repolist

I get the following

[sinux1@horrible-host ~]$ sudo dnf repolist
Extra Packages for Enterprise Linux 7 - x86_64  1.8 MB/s | 9.0 MB     00:05    
Failed to open: /var/cache/dnf/epel-2b6dfc5904c26562/repodata/49c4e3bd54f19136521be9b254830c954369cc22ce1b661db502ebef13b0004c-updateinfo.xml.bz2.
[sinux1@horrible-host ~]$ 

I'm stuck and not sure what my next step is. How can I reverse what I did, and what would have been the proper way of enabling EPEL? Thanks for any input

Best Answer

EPEL is for RHEL and CentOS, and not Fedora. In your case, you've tried to install EPEL for EL7, on Fedora 22.

DNF is doing exactly what it should, you've basically installed a repo which isn't designed to be run on Fedora 22.

edit: Forgot to add, you might want to remove that repo now with

rpm -e epel-release

or

dnf remove epel-release