如何在 RHEL 5 (Linux) 中卸载然后安装 Java 我遇到错误?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/9028978/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How To Uninstall And Then Install Java In RHEL 5 (Linux) I Am Getting Error?
提问by Syed Raza
Hi i need to install the latest version of java in mu RHEL 5 i successfully uninstall it from my os but when i try to install it again i am getting error i am pasting the whole thing i did with error
嗨,我需要在 mu RHEL 5 中安装最新版本的 java 我成功地从我的操作系统中卸载了它,但是当我尝试再次安装它时出现错误我正在粘贴我所做的整个事情时出错
[root@localhost bin]# rpm -qa | grep jdk
jdk-1.5.0_14-fcs
[root@localhost bin]# rpm -e jdk-1.5.0_14-fcs
[root@localhost bin]# rpm -qa | grep jdk
[root@localhost bin]# yum install java
Loaded plugins: product-id, rhnplugin, security, subscription-manager
Updating Red Hat repositories.
There was an error communicating with RHN.
RHN Satellite or RHN Classic support will be disabled.
Error Message:
Service not enabled for system profile: "192.168.1.105"
Error Class Code: 31
Error Class Info:
This system does not have a valid entitlement for Red Hat Network.
Please visit https://rhn.redhat.com/rhn/systems/SystemEntitlements.do
or login at https://rhn.redhat.com, and from the "Your RHN" tab,
select "Subscription Management" to enable RHN service for this system.
Explanation:
Your organization does not have enough Management entitlements to register this
system to Red Hat Network. Please notify your organization administrator of this error.
You should be able to register this system after your organization frees existing
or purchases additional entitlements. Additional entitlements may be purchased by your
organization administrator by logging into Red Hat Network and visiting
the 'Subscription Management' page in the 'Your RHN' section of RHN.
A common cause of this error code is due to having mistakenly setup an
Activation Key which is set as the universal default. If an activation key is set
on the account as a universal default, you can disable this key and retry to avoid
requiring a Management entitlement.
file://var/cache/yum/rhel-i386-server-5/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/cache/yum/rhel-i386-server-5/repodata/repomd.xml'
Trying other mirror.
file://var/cache/yum/rhel-i386-server-vt-5/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/cache/yum/rhel-i386-server-vt-5/repodata/repomd.xml'
Trying other mirror.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package java-1.6.0-openjdk.i386 1:1.6.0.0-1.23.1.9.10.el5_7 set to be updated
--> Processing Dependency: tzdata-java for package: java-1.6.0-openjdk
--> Running transaction check
---> Package tzdata-java.i386 0:2011l-4.el5 set to be updated
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
java-1.6.0-openjdk i386 1:1.6.0.0-1.23.1.9.10.el5_7 rhel-i386-server-5 38 M
Installing for dependencies:
tzdata-java i386 2011l-4.el5 rhel-i386-server-5 180 k
Transaction Summary
================================================================================
Install 2 Package(s)
Upgrade 0 Package(s)
Total download size: 38 M
Is this ok [y/N]: y
Downloading Packages:
Error Downloading Packages:
tzdata-java-2011l-4.el5.i386: failure: getPackage/tzdata-java-2011l-4.el5.i386.rpm from rhel-i386-server-5: [Errno 256] No more mirrors to try.
1:java-1.6.0-openjdk-1.6.0.0-1.23.1.9.10.el5_7.i386: failure: getPackage/java-1.6.0-openjdk-1.6.0.0-1.23.1.9.10.el5_7.i386.rpm from rhel-i386-server-5: [Errno 256] No more mirrors to try.
How to install the latest version of java please help me out
如何安装最新版本的java请帮帮我
Thanks in Advance
提前致谢
回答by James Jithin
Download the latest JDK rpm from the following link:
从以下链接下载最新的 JDK rpm:
See the link below for installation instructions of JDK 1.7 which is currently the latest one:
有关 JDK 1.7 的安装说明,请参阅下面的链接,这是目前最新的版本: