操作系统版本:
[root@node1 ~]# cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.7 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.7"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.7 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.7:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.7
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.7"
尝试使用 RPM 安装 EPEL:
[root@node1 ~]# rpm -Uvh http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Retrieving http://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
Preparing... ################################# [100%]
package epel-release-7-12.noarch is already installed
检查转发者
[root@node1 ~]# yum repolist
Loaded plugins: product-id, search-disabled-repos
repo id repo name status
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13,492
repolist: 13,492
安装 unzip
[root@node1 ~]# yum install unzip
Loaded plugins: product-id, search-disabled-repos
No package unzip available.
Error: Nothing to do
这也不起作用,同样的消息:
[root@node1 ~]# yum install unzip --enablerepo=epel
答案1
检查此主机是否具有有效的 RHEL 订阅。unzip 已由 Red Hat 打包很长时间了。