我的 RHEL 版本:
[root@x]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.9 (Maipo)
我已按照此处的 RHEL 7 说明启用 EPEL:https://docs.fedoraproject.org/en-US/epel/#How_can_I_use_these_extra_packages.3F
subscription-manager repos --enable rhel-*-optional-rpms \
--enable rhel-*-extras-rpms \
--enable rhel-ha-for-rhel-*-server-rpms
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
当我运行第二个命令来安装 epel 时,我得到:
https://cdn.redhat.com/content/e4s/rhel/server/7/7.9/x86_64/optional/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article
https://access.redhat.com/articles/1320623
If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.
https://cdn.redhat.com/content/eus/rhel/server/7/7.9/x86_64/optional/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
我在这里看到这篇文章:https://access.redhat.com/solutions/4780531
所以,我设置了我的发布:
subscription-manager release --set=7.9
这就是您现在/7.9/
在上面的 URL 中看到的原因。
我已禁用并重新启用存储库。仍然是同样的错误。
如果我尝试访问这些有问题的 URL 之一,我会看到:
[root@x]# wget https://cdn.redhat.com/content/e4s/rhel/server/7/7.9/x86_64/optional/os/repodata/repomd.xml
--2022-07-15 10:17:08-- https://cdn.redhat.com/content/e4s/rhel/server/7/7.9/x86_64/optional/os/repodata/repomd.xml
Resolving cdn.redhat.com (cdn.redhat.com)... 23.65.16.251
Connecting to cdn.redhat.com (cdn.redhat.com)|23.65.16.251|:443... connected.
ERROR: cannot verify cdn.redhat.com's certificate, issued by ‘/C=US/ST=North Carolina/O=Red Hat, Inc./OU=Red Hat Network/CN=Red Hat Entitlement Operations Authority/[email protected]’:
Self-signed certificate encountered.
To connect to cdn.redhat.com insecurely, use `--no-check-certificate'.
所以,我运行时没有证书检查:
[root@x]# wget https://cdn.redhat.com/content/e4s/rhel/server/7/7.9/x86_64/optional/os/repodata/repomd.xml --no-check-certificate
--2022-07-15 10:17:14-- https://cdn.redhat.com/content/e4s/rhel/server/7/7.9/x86_64/optional/os/repodata/repomd.xml
Resolving cdn.redhat.com (cdn.redhat.com)... 23.65.16.251
Connecting to cdn.redhat.com (cdn.redhat.com)|23.65.16.251|:443... connected.
WARNING: cannot verify cdn.redhat.com's certificate, issued by ‘/C=US/ST=North Carolina/O=Red Hat, Inc./OU=Red Hat Network/CN=Red Hat Entitlement Operations Authority/[email protected]’:
Self-signed certificate encountered.
HTTP request sent, awaiting response... 403 Forbidden
2022-07-15 10:17:14 ERROR 403: Forbidden.
作为额外检查,我确认了此 URL 中有关证书的所有详细信息:https://access.redhat.com/documentation/en-us/red_hat_subscription_management/1/html/rhsm/certs-troubleshoot-verify
为什么这个破了?显然,该 URL 是有效的,当我直接访问它时,不会提供 404,而是得到 403。那么,为什么yum
说它是404 - Not Found
.为什么直接访问会出现403?
我想做的就是安装iftop
并希望它按预期工作:
[root@x]# yum install iftop
Loaded plugins: product-id, search-disabled-repos, subscription-manager
https://cdn.redhat.com/content/e4s/rhel/server/7/7.9/x86_64/optional/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Trying other mirror.
...
failure: repodata/repomd.xml from rhel-7-server-e4s-optional-rpms: [Errno 256] No more mirrors to try.
https://cdn.redhat.com/content/e4s/rhel/server/7/7.9/x86_64/optional/os/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
我跑过:
subscription-manager repos --disable=rhel-7-server-e4s-optional-rpms
subscription-manager repos --disable=rhel-7-server-eus-optional-rpms
并且已经能够成功安装iftop
。为什么这些东西会坏掉?