How to Enable EPEL Repository for RHEL/CentOS 7.x/6.x/5.x

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Get your own self-hosted blog with a Free Domain at ($3.45/month).
  4. Become a Supporter - Make a contribution via PayPal
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

RedHat RHCE and RHCSA Certification Book
Linux Foundation LFCS and LFCE Certification Preparation Guide

You may also like...

188 Responses

  1. jaya says:

    Hello Ravi,
    When I am trying to install squid proxy.
    Its showing

    no package squid available

    what i can do?

    • Ravi Saive says:


      On which Linux distribution you’re trying to install squid?

      • jaya says:

        In RHEL7 i am trying to install squid..

      • jaya says:

        I am trying to install squid proxy in RHEL7 OS but the output it is giving is

        [[email protected] ~]# yum install squid*
        Loaded plugins: langpacks, product-id, subscription-manager
        This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
        Existing lock /var/run/ another copy is running as pid 3868.
        Another app is currently holding the yum lock; waiting for it to exit...
        The other application is: yum
        Memory :  34 M RSS (472 MB VSZ)
        Started: Wed Mar  8 08:27:53 2017 - 05:54 ago
        State  : Traced/Stopped, pid: 3868
        and before this error it was showing 
        failure: repodata/repomd.xml from squid: [Errno 256] No more mirrors to try. [Errno 14] HTTP Error 404 – Not Found

        How to resolve this issue to install squid proxy ?

        • Ravi Saive says:


          First remove the ngtech repo from /etc/yum.repos directory, then kill the yum with pkill command.

          # rm -rf /etc/yum.repos.d/ngetch.repo
          # pkill yum

          Then try to install squid with yum, I hope this time squid will install without any issues..

  2. Ivan richard Nocum says:

    got an error

    –2017-02-11 00:38:58–
    Resolving (… failed: Name or service not known.
    wget: unable to resolve host address ‘’

  3. JP says:

    I got the error
    [[email protected]_redhat ansi]# yum repolist
    Loaded plugins: product-id, rhnplugin, security, subscription-manager
    This system is receiving updates from Red Hat Subscription Management.
    This system is receiving updates from RHN Classic or RHN Satellite.
    Error: xz compression not available
    [[email protected]_redhat ansi]#

    • Ravi Saive says:


      I think you’ve installed non-CentOS version of xz package, first remove it.

      # yum remove xz

      And then re-install from the default repositories as shown.

      # yum install xz

      I hope it will fix this issue…

  4. priya says:

    Hi Ravi,

    I am getting this error whatever I have installed Trying other mirror. [Errno 14] PYCURL ERROR 6 – “Couldn’t resolve host ‘'”. Please may i know how to fix this

    • Ravi Saive says:


      Please add the DNS Name Servers in /etc/hosts file, if you don’t know DNS, then you can add following line to this file.

  5. Anthony says:

    This no longer works if I enter the commands for installation on CentOS 7.
    # wget
    # rpm -ivh epel-release-7-8.noarch.rpm
    The download works but then when ever I run yum I get this unknown repo message I do not know how to get rid of and I do not have access the the epel repo

    Loaded plugins: fastestmirror, langpacks
    epel/i386/metalink | 40 kB 00:00:00
    Could not parse metalink error was
    No repomd file

    One of the configured repositories failed (Unknown),
    and yum doesn’t have enough cached data to continue. At this point the only
    safe thing yum can do is fail. There are a few ways to work “fix” this:

    1. Contact the upstream for the repository and get them to fix the problem.

    2. Reconfigure the baseurl/etc. for the repository, to point to a working
    upstream. This is most often useful if you are using a newer
    distribution release than is supported by the repository (and the
    packages for the previous distribution release still work).

    3. Disable the repository, so yum won’t use it by default. Yum will then
    just ignore the repository until you permanently enable it again or use
    –enablerepo for temporary usage:

    yum-config-manager –disable

    4. Configure the failing repository to be skipped, if it is unavailable.
    Note that yum will try to contact the repo. when it runs most commands,
    so will have to try and fail each time (and thus. yum will be be much
    slower). If it is a very temporary problem though, this is often a nice

    yum-config-manager –save –setopt=.skip_if_unavailable=true

    File /var/cache/yum/i386/7/epel/metalink.xml does not exist

  6. uma says:

    this is cool. it helps to setup epel.

  7. Sam says:

    Thank you Ravi, you saved my day.

  8. Jaganath says:

    IF Your graph is not showing just change the TIME ZONE under vi /etc/php.ini

    I faced the issue because my system time zone and cacti time is different .

  9. Tarun says:

    Hey Ravi,

    You want to update the path for CentOS6 repo
    It is moved from old domain “”

  1. December 8, 2016

    […] you need to Enable EPEL repository and then install using yum command as […]

Got something to say? Join the discussion.

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.