我们有 redhat 机器 - 版本 7.2
我们安装了 epel repo,如下所示
rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
yum install epel-release
yum repolist
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
repo id repo name status
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13,416
repolist: 13,416
但是当我们想将java安装为
yum install java-1.8.0-openjdk-devel*
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
No package java-1.8.0-openjdk-devel* available.
Error: Nothing to do
我哪里错了?
答案1
如错误消息所述,您的系统未注册。来自java-1.8.0-openjdk-devel
/etc/yum.repos.d/redhat-repo 文件中指定的 Redhat Repos 之一。yum repolist
由于这个原因,这些存储库在运行时不会显示。如果yum
系统未注册,您将无法从这些存储库安装任何软件包。
java-latest-openjdk
EPEL提供的 Javajava-latest-openjdk-devel
版本为 1:12.0.2.9-1。如果该版本有效,您可以安装它,但如果您需要 1.8.0,则需要向 Red Hat 注册该系统。