I tried to install jdk7 (Linux x64 rpm) on to my Amazon EC2 instance. I used wget and curl -o to do so but it did not download successfully. Instead, it downloaded an error html file wherein it tells to accept the license agreement before downloading. I used this link http://www.oracle.com/technetwork/java/javase/downloads/jdk7u7-downloads-1836413.html to accept the agreement after which I right clicked on the package and copied the link and tried downloading it through command line, but it did not work. I downloaded it to my local machine and used scp to move it on to my local directory in EC2. But when I tried executing it, it threw these errors :
我尝试在我的Amazon EC2实例上安装jdk7 (Linux x64 rpm)。我使用了wget和curl -o,但没有成功下载。相反,它下载了一个错误的html文件,在下载之前它告知接受许可协议。我使用这个链接http://www.oracle.com/technetwork/java/javase/downloads/jdk7u7-downloads-1836413.html来接受协议,在此之后,我点击了这个包并复制了这个链接,并尝试通过命令行下载它,但是没有成功。我将它下载到本地机器上,并使用scp将其移动到EC2上的本地目录。但是当我尝试执行它时,它会抛出这些错误:
sudo rpm -i jdk-7u7-linux-x64.rpm
Unpacking JAR files...
rt.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_07/jre/lib/rt.pack
jsse.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_07/jre/lib/jsse.pack
charsets.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_07/jre/lib/charsets.pack
tools.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_07/lib/tools.pack
localedata.jar...
Error: Could not open input file: /usr/java/jdk1.7.0_07/jre/lib/ext/localedata.pack
I googled for a solution and came across this link : http://docs.oracle.com/javase/7/docs/webnotes/install/linux/linux-jdk.html
我在google上搜索了一个解决方案,并找到了这个链接:http://docs.oracle.com/javase/7/docs/webnotes/install/linux/linux/linux - jdkhtml。
Even though it says : "1. Download the file. Before the file can be downloaded, you must accept the license agreement." is there any way of accepting the license through command line?
即使它说:“1。下载该文件。在下载文件之前,您必须接受许可协议。“是否有任何方式通过命令行来接受许可证?”
Thank you!
谢谢你!
I don't think this issue is caused by a problem accepting the license agreement (that is just to download), I think this is related to a buggy rpm package. Post this rpm -i install, does java work? Can you navigate to /usr/java/jdk1.7.0_07/jre/bin and run java?
我不认为这个问题是由接受许可协议的问题引起的(这只是下载),我认为这与一个错误的rpm包有关。安装这个rpm -我安装,java工作吗?您能导航到/usr/java/jdk1.7.0_07/jre/bin并运行java吗?
3 个解决方案
#1
6
It's not you, it is the Oracle site. They changed their licensing strategy.
不是你,是甲骨文网站。他们改变了他们的许可策略。
Read this blog post for more information, and some tips on automating it.
阅读这篇博文,获取更多的信息,以及一些关于自动化的技巧。
An interesting tidbit at the bottom of the post:
下面是一则有趣的小道消息:
According to the OTN BCL document for Java SE:
根据OTN BCL文档的Java SE:
BY SELECTING THE “ACCEPT LICENSE AGREEMENT” (OR THE EQUIVALENT) BUTTON AND/OR BY USING THE SOFTWARE YOU ACKNOWLEDGE THAT YOU HAVE READ THE TERMS AND AGREE TO THEM.
通过选择“接受许可协议”(或等效的)按钮和/或使用软件,您承认您已经阅读了条款并同意它们。
#2
6
For me it worked the following
对我来说,它起到了如下作用。
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie;" http://download.oracle.com/otn-pub/java/jdk/8u40-b26/jdk-8u40-linux-x64.rpm
#3
0
There's a simple way:
有一个简单的方法:
wget --no-check-certificate --no-cookies --header "Cookie: gpw_e24=yippi ka yei madafaka;" http://download.oracle.com/blahblah....
You can send anything you want as cookie value for "gpw_e24"
你可以发送任何你想要的cookie值作为"gpw_e24"
P.D: Excuse my poor english, trying my best ;-)
P。D:对不起,我的英语不好,我尽力了。
#1
6
It's not you, it is the Oracle site. They changed their licensing strategy.
不是你,是甲骨文网站。他们改变了他们的许可策略。
Read this blog post for more information, and some tips on automating it.
阅读这篇博文,获取更多的信息,以及一些关于自动化的技巧。
An interesting tidbit at the bottom of the post:
下面是一则有趣的小道消息:
According to the OTN BCL document for Java SE:
根据OTN BCL文档的Java SE:
BY SELECTING THE “ACCEPT LICENSE AGREEMENT” (OR THE EQUIVALENT) BUTTON AND/OR BY USING THE SOFTWARE YOU ACKNOWLEDGE THAT YOU HAVE READ THE TERMS AND AGREE TO THEM.
通过选择“接受许可协议”(或等效的)按钮和/或使用软件,您承认您已经阅读了条款并同意它们。
#2
6
For me it worked the following
对我来说,它起到了如下作用。
wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie;" http://download.oracle.com/otn-pub/java/jdk/8u40-b26/jdk-8u40-linux-x64.rpm
#3
0
There's a simple way:
有一个简单的方法:
wget --no-check-certificate --no-cookies --header "Cookie: gpw_e24=yippi ka yei madafaka;" http://download.oracle.com/blahblah....
You can send anything you want as cookie value for "gpw_e24"
你可以发送任何你想要的cookie值作为"gpw_e24"
P.D: Excuse my poor english, trying my best ;-)
P。D:对不起,我的英语不好,我尽力了。