无法在Red Hat中安装openJDK 8 [英] Unable to install openJDK 8 in Red Hat
问题描述
我试图按照 https://openjdk的方法,使用yum在我的机器上安装openJDK 8.java.net/install/.
但是在yum存储库中看不到打开的openJDK 8.
But I can't see open openJDK 8 in yum repository.
[root@test ~]# yum search jdk
Loaded plugins: downloadonly, product-id, refresh-packagekit, security,
: subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
=============================== N/S Matched: jdk ===============================
java-1.6.0-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.6.0-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.6.0-openjdk-javadoc.x86_64 : OpenJDK API Documentation
java-1.7.0-openjdk.x86_64 : OpenJDK Runtime Environment
java-1.7.0-openjdk-devel.x86_64 : OpenJDK Development Environment
java-1.7.0-openjdk-javadoc.noarch : OpenJDK API Documentation
icedtea-web.x86_64 : Additional Java components for OpenJDK - Java browser
: plug-in and Web Start implementation
ldapjdk.x86_64 : The Mozilla LDAP Java SDK
yum.conf文件:
yum.conf file:
[main]
cachedir=/var/cache/yum/$basearch/$releasever
keepcache=0
debuglevel=2
logfile=/var/log/yum.log
exactarch=1
obsoletes=1
gpgcheck=1
plugins=1
installonly_limit=3
exclude=mongodb-org,mongodb-org-server,mongodb-org-shell,mongodb-org-mongos,mongodb-org-tools
推荐答案
如果您的版本太旧,您没有包含软件包,或者您必须先启用更多存储库才能获取软件包.
If your version is too old you don't have the packages included or you have to enable some more repositories first to get the packages.
要列出已启用的存储库:
To list enabled repos:
subscription-manager repos --list-enabled
要启用第三方存储库:
subscription-manager repos --enable rhel-7-server-optional-rpms
当您的版本不是旧版本时,您可以进行 yum更新
并获取所有新软件包.然后你应该可以安装 JDK 8.这是另一个如何在 Red-Hat 上安装 JDK-8 的好教程.
When your version isn't to old you can make an yum update
and fetch all new packages. Then you should be able to install JDK 8. Here is another good tutorial how to install JDK-8 on Red-Hat.
https://developers.redhat.com/文章/using-java-rhel-7-openjdk-8/
如果使用较旧的Red-Hat版本,则必须自行安装.
If you use an older Red-Hat version you have to install it on your own.
https://tecadmin.net/install-java-8-on-centos-rhel-and-fedora/
这篇关于无法在Red Hat中安装openJDK 8的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!