无法在 RHEL 7.2 上使用 yum

无法在 RHEL 7.2 上使用 yum

我目前正在运行 RHEL Server 7.2,每次运行 yum 命令(即使是基本命令,如更新、安装、本地安装等)时,都会收到以下错误:

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 <repoid>

 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
    compromise:

        yum-config-manager --save --setopt=<repoid>.skip_if_unavailable=true

Cannot retrieve metalink for repository: epel/x86_64. Please verify its path and try again

我读到过一种修复此问题的方法是将 /etc/yum.repos.d/epel.repo 中的所有“https”实例更改为“http”,但这对我来说不起作用。我还尝试更新 SSL 证书,但没有成功。有什么想法吗?谢谢!

-编辑 这是我学校(宾州州立大学伯克分校)的一个终端。它是校园内为数不多的几台 Linux 机器之一,因此几乎没有任何支持。它是为我的本科研究项目设置的,所以只有我和教授会使用它。所有网络设置,包括 DNS 设置,都是学校之前配置的。

-编辑我尝试运行 yum update 命令但 epel repo 被禁用,结果如下:

773 physics10 -- /home/student/Desktop/tmux-x86_64-rhel6>yum update --disablerepo=epel/x86_64
Loaded plugins: langpacks, product-id, rhnplugin, search-disabled-repos, subscription-manager
This system is receiving updates from RHN Classic or Red Hat Satellite.


Error getting repository data for epel/x86_64, repository not found
774 physics10 -- /home/student/Desktop/tmux-x86_64-rhel6>yum update --disablerepo=epel
Loaded plugins: langpacks, product-id, rhnplugin, search-disabled-repos, subscription-manager
This system is receiving updates from RHN Classic or Red Hat Satellite.
http://li.nux.ro/download/nux/dextop/el7/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://li.nux.ro/download/nux/dextop/el7/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
 http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
http://li.nux.ro/download/nux/dextop/el7/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://li.nux.ro/download/nux/dextop/el7/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
http://li.nux.ro/download/nux/dextop/el7/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://li.nux.ro/download/nux/dextop/el7/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
http://li.nux.ro/download/nux/dextop/el7/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://li.nux.ro/download/nux/dextop/el7/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
http://li.nux.ro/download/nux/dextop/el7/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://li.nux.ro/download/nux/dextop/el7/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.
http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
Trying other mirror.

One of the configured repositories failed (Nux.Ro RPMs for general desktop use),
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 nux-dextop

 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
    compromise:

        yum-config-manager --save --setopt=nux-dextop.skip_if_unavailable=true

failure: repodata/repomd.xml from nux-dextop: [Errno 256] No more mirrors to try.
http://li.nux.ro/download/nux/dextop/el7/x86_64/repodata/repomd.xml: [Errno 12] Timeout on     http://li.nux.ro/download/nux/dextop/el7/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
http://li.nux.ro/download/nux/dextop/el7/x86_64/repodata/repomd.xml: [Errno 12] Timeout on http://li.nux.ro/download/nux/dextop/el7/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/x86_64/repodata/repomd.xml: [Errno 12] Timeout on     http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
http://li.nux.ro/download/nux/dextop/el7/x86_64/repodata/repomd.xml: [Errno 12] Timeout on     http://li.nux.ro/download/nux/dextop/el7/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/x86_64/repodata/repomd.xml: [Errno 12] Timeout on     http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
http://li.nux.ro/download/nux/dextop/el7/x86_64/repodata/repomd.xml: [Errno 12] Timeout on     http://li.nux.ro/download/nux/dextop/el7/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/x86_64/repodata/repomd.xml: [Errno 12] Timeout on     http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
http://li.nux.ro/download/nux/dextop/el7/x86_64/repodata/repomd.xml: [Errno 12] Timeout on     http://li.nux.ro/download/nux/dextop/el7/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/x86_64/repodata/repomd.xml: [Errno 12] Timeout on     http://mirror.li.nux.ro/li.nux.ro/nux/dextop/el7/x86_64/repodata/repomd.xml: (28, 'Connection timed out after 30001 milliseconds')
775 physics10 -- /home/student/Desktop/tmux-x86_64-rhel6>

答案1

你好

您是否尝试过禁用似乎是有问题的 repo 的 epel repo?

yum update --disablerepo=epel/x86_64
yum update --disablerepo=epel

如果效果更好,则说明你的epel配置错误,也许你可以删除它并重新安装

rm -f /etc/yum.repos.d/epel*
yum remove epel-release
yum install epel-release

相关内容