我正在将 AWS EC2 与 ubuntu 16.04 LTS 结合使用。突然,当我尝试安装 Oracle java 8 时遇到错误。
add-apt-repository ppa:webupd8team/java -y
aptitude update -y
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
aptitude install oracle-java8-installer -y
The following partially installed packages will be configured:
oracle-java8-installer
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
Setting up oracle-java8-installer (8u144-1~webupd8~0) ...
Using wget settings from /var/cache/oracle-jdk8-installer/wgetrc
Downloading Oracle Java 8...
--2017-10-19 18:42:30-- http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 23.215.130.114, 23.215.130.99
Connecting to download.oracle.com (download.oracle.com)|23.215.130.114|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz [following]
--2017-10-19 18:42:31-- https://edelivery.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 96.6.58.35, 2600:1408:17:188::2d3e, 2600:1408:17:186::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|96.6.58.35|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz?AuthParam=1508438671_73b5cc5baf26df8633a02d561a0ad83e [following]
--2017-10-19 18:42:31-- http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz?AuthParam=1508438671_73b5cc5baf26df8633a02d561a0ad83e
Connecting to download.oracle.com (download.oracle.com)|23.215.130.114|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-10-19 18:42:31 ERROR 404: Not Found.
download failed
Oracle JDK 8 is NOT installed.
dpkg: error processing package oracle-java8-installer (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
oracle-java8-installer
我的朋友是:
ubuntu/images/hvm-ssd/ubuntu-xenial-16.04-amd64-server-20171011 (ami-49426e2c)
过去几个月一直有效,从今天开始就出现这个问题。有谁知道为什么会发生以及解决方法是什么?请告诉我。
谢谢。