8

I am running Red Hat Enterprise Linux Server release 7.8 (Maipo) and when I try to run.

yum install epel-release 

No package epel-release available.

Error: Nothing to do

I need to install this for DKMS

3 Answers 3

15

Run:

yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm 

You have to do this because epel-release package is directly available in CentOS base repository, but not in RHEL repository.

According to documentation, it is also recommended to enable some optional repositories:

subscription-manager repos --enable "rhel-*-optional-rpms" --enable "rhel-*-extras-rpms" --enable "rhel-ha-for-rhel-*-server-rpms" 
2

Run the command below as http: (not https:):

yum install http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm 

to avoid the error:

Cannot open: https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm. Skipping. 
3
  • This seems like it should be a comment on Danila Vershinin's answer. Commented Feb 8, 2022 at 21:33
  • That is true, I'll edit my post by turning it into a comment. Thanks. Commented Feb 9, 2022 at 19:54
  • @G-ManSays'ReinstateMonica' With such low reputation comment is not allowed for him, I think. Commented Oct 11, 2022 at 21:58
2

According to https://dl.fedoraproject.org/pub/epel/7/README, the RPM file was moved to https://archives.fedoraproject.org.

This command should work:

yum install https://archives.fedoraproject.org/pub/archive/epel/7/x86_64/Packages/e/epel-release-7-14.noarch.rpm 

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.