无法使用wget在CentOS机器上安装oracle jdk [英] Not able to install oracle jdk on CentOS machine using wget

查看:75
本文介绍了无法使用wget在CentOS机器上安装oracle jdk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在CentOS上安装Oracle Java JDK 8我无法安装java jdk,因为当我尝试使用命令

I want to install oracle java jdk 8 on CentOS I am not able to install java jdk because when I try to install java jdk using command

[root@ADARSH-PROD1 ~]# wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u131-b27/jdk-8u131-linux-x64.rpm"

我收到输出:

Connecting to edelivery.oracle.com 
(edelivery.oracle.com)|23.211.196.232|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/8u131-b27/jdk-8u131-    linux-x64.rpm?AuthParam=1495864027_230ebffd10615c26528e8d2496500338 [following]
--2017-05-27 11:15:07--  http://download.oracle.com/otn-pub/java/jdk/8u131-    b27/jdk-8u131-linux-x64.rpm?    AuthParam=1495864027_230ebffd10615c26528e8d2496500338
Connecting to download.oracle.com (download.oracle.com)|184.25.109.32|:80...     connected.
HTTP request sent, awaiting response... 404 Not Found
2017-05-27 11:15:09 ERROR 404: Not Found.

推荐答案

Oracle已更新了链接生成机制.现在,它包含一些序列,该序列似乎对于版本而言是持久的,但使用未知机制.另外,要下载除 latest 以外的任何版本,您现在需要具有Oracle帐户:

Oracle has updated links generation mechanism. It now includes some sequence, which seems to be persistent for a version but generated with a yet unknown mechanism. Also, to download any version except for latest you're now required to have Oracle account:

对于生产用途,Oracle建议下载最新的JDK和JRE版本并允许自动更新.

For production use Oracle recommends downloading the latest JDK and JRE versions and allowing auto-update.

仅开发人员和企业管理员应下载这些内容发布.

Only developers and Enterprise administrators should download these releases.

下载这些版本需要一个oracle.com帐户.如果你没有oracle.com帐户,您可以使用顶部的链接此页面以了解更多信息并免费注册.

Downloading these releases requires an oracle.com account. If you don't have an oracle.com account you can use the links on the top of this page to learn more about it and register for one for free.

Oracle Java Archives 页面上了解更多信息.

See more at Oracle Java Archives page.

所以您现在有两个选择.

So you're stuck with two options now.

选项1.通过新的直接链接使用最新版本(现在为 8u131 ).该链接可在 Java SE开发工具包8下载页面上找到.接受许可协议后.您的命令将是:

Option 1. Use the latest version (8u131 now) by a new direct link. The link is available at the Java SE Development Kit 8 downloads page after you accept the License agreement. And your command will be:

wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jdk-8u131-linux-x64.rpm"

选项2.切换到 openjdk 包:

yum install java-1.8.0-openjdk

OpenJDK:下载并安装页面上了解有关openjdk安装的更多信息.

See more about openjdk installation at OpenJDK: Download and install page.

这篇关于无法使用wget在CentOS机器上安装oracle jdk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆