7

When I run yum repolist, I don't see EPEL listed.

# yum repolist

Loaded plugins: downloadonly, fastestmirror, protectbase, refresh-packagekit,
              : security
Loading mirror speeds from cached hostfile
 * base: centos.mia.host-engine.com
 * extras: mirror-centos.hostingswift.com
 * updates: centos-mirror.jchost.net
0 packages excluded due to repository protections
repo id                        repo name                                  status
base                           CentOS-6 - Base                            6,518
extras                         CentOS-6 - Extras                             35
updates                        CentOS-6 - Updates                           209
repolist: 6,762

I followed http://xmodulo.com/how-to-set-up-epel-repository-on-centos.html

Those instructions show me how to install the RPM and the GPG key. Which I've done:

# sudo rpm -Uvh http://mirrors.kernel.org/fedora-epel/6/i386/epel-release-6-8.noarch.rpm
Retrieving http://mirrors.kernel.org/fedora-epel/6/i386/epel-release-6-8.noarch.
rpm
Preparing...                ########################################### [100%]
        package epel-release-6-8.noarch is already installed
101010
  • 763

3 Answers3

9

Have you ensured that it's enabled? If a repo isn't enabled then it won't show up in repolist. Check the files in /etc/yum.repos.d/*.repo.

For example:

[root@xxx01 ~]# yum repolist 2>&1 | grep epel
epel                                      EPEL Repo                       11,148

Shows that EPEL is installed and listed in repolist so I go to disable it and check repolist again:

[root@xxx01 ~]# sed -i 's/enabled=1/enabled=0/g' /etc/yum.repos.d/epel.repo
[root@xxx01 ~]# yum repolist 2>&1 | grep epel
[root@xxx01 ~]#

EDIT:

You can also temporarily enable the repo by using the --enablerepo option which overrides the enabled setting in the repo's config.

Bratchley
  • 16,824
  • 14
  • 67
  • 103
3

The EPEL repository package is also now installable directly from the CentOS Extras repository in all supported CentOS versions (5, 6 and 7). Johnny Hughes (one of the CentOS team) mentions this in the comments of the xmodulo.com article you followed, but the page only seems to have been updated to reflect this being the case for CentOS 7.

The CentOS Extras repository should be enabled by default, so you can just run:

sudo rpm -e epel-release

to remove the existing package and then:

sudo yum install epel-release

to enable EPEL.

Source:

mvermaes
  • 266
2

I usually use this source for CentOS 6.x, and like to rpm -Uvh it from a local file:

wget http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
sudo rpm -Uvh epel-release-6*.rpm

Although i can not see why yours should not work either, but you can try mine. Always worked for me.

Adionditsak
  • 3,935