centos 6 epel 替代存储库替换

centos 6 epel 替代存储库替换

我的服务器上已经安装了 EPEL 存储库。我想安装一些新东西,但使用 yum 时出现此错误:

PYCURL ERROR 22 - "The requested URL returned error: 403 Forbidden" Trying other mirror. Error: Cannot retrieve repository metadata (repomd.xml) for repository: CentALT. Please verify its path and try again

当我检查 EPEL(编者注:实际上是 CentALT,但为了清晰起见保留了原文)网址时,我得到了这个错误网址

403 Forbidden - nginx

因此我决定更换 EPEL 源。我按照以下步骤http://howto.wikin.com/wiki/How_to_Delete_Centos_Repositories删除了以前的存储库,然后我yum repolist得到了以下信息:

Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * base: centos.mirror.gtcomm.net
 * extras: centos.mirror.gtcomm.net
 * updates: centos.mirror.iweb.ca
http://centos.alt.ru/repository/centos/6/x86_64/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 403 Forbidden"
Trying other mirror.
repo id         repo name                                                 status
CentALT         CentALT Packages for Enterprise Linux 6 - x86_64          0
base            CentOS-6 - Base                                           0
extras          CentOS-6 - Extras                                         0
mariadb         MariaDB                                                   0
updates         CentOS-6 - Updates                                        0
repolist: 0

现在,当我想使用此命令安装 EPEL 存储库时:

sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm

仍然收到此错误:

Retrieving http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm Preparing... ########################################### [100%] package epel-release-6-8.noarch is already installed

我如何安装 EPEL repo?

答案1

要重新安装 EPEL 存储库,请运行该存储库yum reinstall.rpm

yum reinstall 'http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm'

答案2

您将问题归咎于错误的存储库。错误是针对 CentALT 存储库的。此时它似乎已经停止使用(返回 403)。在这种情况下,解决方案是删除 CentALT 存储库并运行yum clean all。至于 EPEL 未出现在存储库列表中,请查看运行后会发生什么yum clean all。看来它仍安装在您的系统上。

相关内容