2

On RHEL 6 I seem to have the EPEL repository installed but it does not appear in yum.

  1. I tested that I have EPEL installed by installing it again from the downloaded rpm:

    rpm -ivh epel-release-6-8.noarch.rpm
    

    This gives me the message: package epel-release-6-8.noarch is already installed

  2. When I list all repositories available to yum via the command

    yum repolist
    

    however, I do not get EPEL in the output. Also when I search for packages provided by EPEl, they are not found (aspell dictionaries for example)

  3. I tried to enable EPEL explicitly via the command-line switch --enablerepo=epel, but that returns a repository not found error.

So, how can I install, enable or 'activate' the EPEL repository for use with yum?

4
  • if you have epel rpm downloaded. then simply do force install via yum. or rpm -e epel-release-6-8.noarch.rpm.
    – AReddy
    Sep 6, 2017 at 5:33
  • @Mongrel Mmmmh, issuing rpm -e epel-release-6-8.noarch.rpm I get "error: package epel-release-6-8.noarch.rpm is not installed".
    – halloleo
    Sep 6, 2017 at 6:07
  • @Mongrel Yes: yum install force epel-release-6-8.noarch.rpm returns the message epel-release-6-8.noarch.rpm: does not update installed package. Error: Nothing to do
    – halloleo
    Sep 6, 2017 at 6:16
  • @Mongrel Cool, that's it! The reinstall command (with epel-release-6-8.noarch.rpm) does the trick! Do you write it up as an answer, please?
    – halloleo
    Sep 6, 2017 at 6:25

2 Answers 2

4

You can try the command below which will reinstall the rpm.

yum reinstall epel-release-6-8.noarch.rpm

0

Asked 6 years, 7 months ago

while reinstalling the epel-release-6-8.noarch.rpm obtained from https://docs.fedoraproject.org/en-US/epel/ is one valid approach,

and has its benefits for instance if the corresponding repo file on the system was modified and/or got corrupted,

understand simply it comes down to this:

  1. is the .repo file present in the /etc/yum.repos.d/ folder ?
  2. does the .repo file have enabled = 1 within ? If not, simply edit it and change the 0 there to a 1
  3. is the repo commented out?

you could also do yum-config-manager --enable epel, where epel is the repo name which is that syntax between the [ ] in the .repo file, but that only works if the repo file is valid and it is just and enabled = 0 or 1 issue. For EPEL it's easy, for some other repo's where the name is long and complex odds are you'll mistype it this way so it is easier to just go edit the /etc/yum.repos.d/ file for enabled=1.

Here is the contents of https://dl.fedoraproject.org/pub/archive/epel/6/x86_64/epel-release-6-8.noarch.rpm (as of today)

[epel]
name=Extra Packages for Enterprise Linux 6 - $basearch
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-6&arch=$basearch
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6

[epel-debuginfo]
name=Extra Packages for Enterprise Linux 6 - $basearch - Debug
#baseurl=http://download.fedoraproject.org/pub/epel/6/$basearch/debug
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-         debug-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1

[epel-source]
name=Extra Packages for Enterprise Linux 6 - $basearch - Source
#baseurl=http://download.fedoraproject.org/pub/epel/6/SRPMS
mirrorlist=https://mirrors.fedoraproject.org/metalink?repo=epel-   source-6&arch=$basearch
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-6
gpgcheck=1

You must log in to answer this question.

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