9

So I tried to install epel on a CentOS7 server.

I ran sudo yum install epel-release as per these instructions.

But now whenever I use yum for instance with yum repolist all I get an error:

Repository epel is listed more than once in the configuration

yum advises to disable the repository with : yum-config-manager --disable <repoid>

/etc/yum.repos.d has : epel.repo, epel-testing.repo and localc7.repo if that's of any help

1
  • 2
    What is the output returned from "yum repolist"? Feb 14, 2018 at 11:12

3 Answers 3

10

This error usually occurs when you have two repos with the same name. I think you may have named both the epel entries the same.

Try going into /etc/yum.repos.d

Look at both the epel files.

Check the name is different.

cd /etc/yum.repos.d
cat epel.*

Verify that they have different name.

The line you are interested in is:

name=SomeName

If they share the same name just change it so they are different.

1
  • Maybe testing and non-testing cannot both be enabled?
    – Ned64
    Feb 14, 2018 at 11:28
4

Another possibility is that you have the same repo defined in different files. So do:

grep epel /etc/yum.repos.d/*

.. note the duplicates and rename/comment them out.

1

In my case, the description in [my_reponame] is the same as the other file.

I renamed the description as the filename (or other string).

It works for me.

You must log in to answer this question.

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