CentOS Repository epel is listed more than once in the configuration

在使用 yum 如果出现以下提示,一般是设置了多个 epel 仓库:

Repository epel is listed more than once in the configuration

仓库列表位于 /etc/yum.repos.d/

1$ ls -l /etc/yum.repos.d/ | grep pel
2-rw-r--r-- 1 root root  230 Jan  8 11:29 CentOS-Epel.repo
3-rw-r--r-- 1 root root 1050 Sep 18 07:25 epel.repo
4-rw-r--r-- 1 root root 1149 Sep 18 07:25 epel-testing.repo

可以看到系统有多个 epel 的仓库,我们逐一检查:

1$ cat /etc/yum.repos.d/CentOS-Epel.repo
2[epel]
3...
1$ cat /etc/yum.repos.d/epel.repo
2[epel]
3...

然后把多余的 [epel] 注释或者删除即可。