简体   繁体   中英

Can't install Java9 due to download.oracle.com HTTP request sent throws 404 error

I can't install automated Java9 installation in UBUNTU16 machine which was working fine since long. Is this due to intermittent network connectivity of download.oracle.com server? It usually works fine and all of sudden stopped working now. Is there anything wrong in below or any changes you suggest to make it working?

Please suggest work around for automated installation so just running command it will install Java9. Same issue with Java8 as well.

Command:

echo "===> Add webupd8 repository..."  && \
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list  && \
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list  && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886  && \
apt-get update  && \
echo "===> Install Java9"  && \
echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections  && \
echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections  && \
DEBIAN_FRONTEND=noninteractive apt-get install -y oracle-java9-installer oracle-java9-set-default --assume-yes

Error:

Location: http://download.oracle.com/otn-pub/?AuthParam=1521872253_ffa6f7b8f45863ea275d907281a7a538 [following]
--2018-03-24 06:15:33--  http://download.oracle.com/otn-pub/?AuthParam=1521872253_ffa6f7b8f45863ea275d907281a7a538
Connecting to download.oracle.com (download.oracle.com)|23.57.201.44|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-03-24 06:15:33 ERROR 404: Not Found.

Log:

echo "===> Add webupd8 repository..."  &&      echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list  &&         echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list  &&       apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886  &&   apt-get update  &&      echo "===> Install Java9"  &&   echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections  &&    echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections  &&         DEBIAN_FRONTEND=noninteractive apt-get install -y oracle-java9-installer oracle-java9-set-default --assume-yes
 ---> Running in 45c02c79cbe6
===> Add webupd8 repository...
deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main
Executing: /tmp/tmp.eMJdEX6PMy/gpg.1.sh --keyserver
keyserver.ubuntu.com
--recv-keys
EEA14886
gpg: requesting key EEA14886 from hkp server keyserver.ubuntu.com
gpg: key EEA14886: public key "Launchpad VLC" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
Hit:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Hit:2 http://archive.ubuntu.com/ubuntu xenial InRelease
Get:3 http://ppa.launchpad.net/webupd8team/java/ubuntu trusty InRelease [15.5 kB]
Hit:4 http://archive.ubuntu.com/ubuntu xenial-updates InRelease
Hit:5 http://archive.ubuntu.com/ubuntu xenial-backports InRelease
Get:6 http://ppa.launchpad.net/webupd8team/java/ubuntu trusty/main Sources [1,403 B]
Get:7 http://ppa.launchpad.net/webupd8team/java/ubuntu trusty/main amd64 Packages [3,146 B]
Fetched 20.0 kB in 1s (15.6 kB/s)
Reading package lists...
===> Install Java9
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
  gsfonts gsfonts-x11
Suggested packages:
  binfmt-support visualvm ttf-baekmuk | ttf-unfonts | ttf-unfonts-core
  ttf-kochi-gothic | ttf-sazanami-gothic ttf-kochi-mincho
  | ttf-sazanami-mincho ttf-arphic-uming
The following NEW packages will be installed:
  gsfonts gsfonts-x11 oracle-java9-installer oracle-java9-set-default
0 upgraded, 4 newly installed, 0 to remove and 71 not upgraded.
Need to get 3,417 kB of archives.
After this operation, 5,110 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu xenial/main amd64 gsfonts all 1:8.11+urwcyr1.0.7~pre44-4.2ubuntu1 [3,374 kB]
Get:2 http://ppa.launchpad.net/webupd8team/java/ubuntu trusty/main amd64 oracle-java9-installer amd64 9.0.4-1~webupd8~0 [31.3 kB]
Get:3 http://ppa.launchpad.net/webupd8team/java/ubuntu trusty/main amd64 oracle-java9-set-default amd64 9.0.4-1~webupd8~0 [4,482 B]
Get:4 http://archive.ubuntu.com/ubuntu xenial/universe amd64 gsfonts-x11 all 0.24 [7,314 B]
Preconfiguring packages ...
Fetched 3,417 kB in 1s (2,573 kB/s)
Selecting previously unselected package oracle-java9-installer.
(Reading database ... 66458 files and directories currently installed.)
Preparing to unpack .../oracle-java9-installer_9.0.4-1~webupd8~0_amd64.deb ...
oracle-license-v1-1 license has already been accepted
Unpacking oracle-java9-installer (9.0.4-1~webupd8~0) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for shared-mime-info (1.5-2ubuntu0.1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5.1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Setting up oracle-java9-installer (9.0.4-1~webupd8~0) ...
No /var/cache/oracle-jdk9-installer/wgetrc file found.
Creating /var/cache/oracle-jdk9-installer/wgetrc and
using default oracle-java9-installer wgetrc settings for it.
Downloading Oracle Java 9...
--2018-03-24 06:15:33--  http://download.oracle.com/otn-pub/java/jdk/9.0.4+11/c2514751926b4512b076cc82f959763f/jdk-9.0.4_linux-x64_bin.tar.gz
Resolving download.oracle.com (download.oracle.com)... 23.57.201.44
Connecting to download.oracle.com (download.oracle.com)|23.57.201.44|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/ [following]
--2018-03-24 06:15:33--  https://edelivery.oracle.com/otn-pub/
Resolving edelivery.oracle.com (edelivery.oracle.com)... 104.122.102.128, 2600:140f:9:18c::2d3e, 2600:140f:9:193::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|104.122.102.128|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/?AuthParam=1521872253_ffa6f7b8f45863ea275d907281a7a538 [following]
--2018-03-24 06:15:33--  http://download.oracle.com/otn-pub/?AuthParam=1521872253_ffa6f7b8f45863ea275d907281a7a538
Connecting to download.oracle.com (download.oracle.com)|23.57.201.44|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-03-24 06:15:33 ERROR 404: Not Found.

download failed
Oracle JDK 9 is NOT installed.
dpkg: error processing package oracle-java9-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 oracle-java9-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
The command '/bin/sh -c echo "===> Add webupd8 repository..."  &&       echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list  &&         echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list  &&       apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886  &&   apt-get update  &&      echo "===> Install Java9"  &&        echo debconf shared/accepted-oracle-license-v1-1 select true | debconf-set-selections  &&       echo debconf shared/accepted-oracle-license-v1-1 seen true | debconf-set-selections  &&         DEBIAN_FRONTEND=noninteractive apt-get install -y oracle-java9-installer oracle-java9-set-default --assume-yes' returned a non-zero code: 100
You have new mail in /var/mail/root

i got this now for now : http://ftp.osuosl.org/pub/funtoo/distfiles/oracle-java/ hope oracle will be back online ....

   wget http://ftp.osuosl.org/pub/funtoo/distfiles/oracle-java/jdk-8u144-linux-x64.tar.gz
   tar zxvf jdk-8u144-linux-x64.tar.gz
   mv jdk1.8.0_144 /opt/
   echo 'export JAVA_HOME=/opt/jdk1.8.0_144/' >> ~/.bashrc 
   echo 'export PATH=$JAVA_HOME/bin:$PATH' >> ~/.bashrc 
   source ~/.bashrc 
   java -version

No.

The Oracle web server returns a redirect link to a file that turns out no to be there. This should be a temporary error, so try again later.

OpenJDK 9 should be available in the Ubuntu repositories directly, and may be a usable alternative depending on your needs.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM