Skip to content

Instantly share code, notes, and snippets.

@pvin
Created January 26, 2018 08:03
Show Gist options
  • Save pvin/5ab2ee75e70962c562ab244d34693d0f to your computer and use it in GitHub Desktop.
Save pvin/5ab2ee75e70962c562ab244d34693d0f to your computer and use it in GitHub Desktop.
download failed Oracle JDK 7 is NOT installed.
Error in ubuntu
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1516952596_55b9e59ffae6c3f024085f23ab730ec5 [following]
--2018-01-26 13:11:17-- http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1516952596_55b9e59ffae6c3f024085f23ab730ec5
Connecting to download.oracle.com (download.oracle.com)|23.40.72.119|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-01-26 13:11:18 ERROR 404: Not Found.
download failed
Oracle JDK 7 is NOT installed.
dpkg: error processing package oracle-java7-installer (--configure):
subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
oracle-java7-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
Solution :
Since Oracle has moved the download link and requires login credentials to download older versions of java, follow the following steps to install java 7:
1) Download latest java version from http://www.oracle.com/technetwork/java/javase/downloads/java-archive-downloads-javase7-521261.html. You will need to login.
2) Delete jdk-7uXX-linux-x64.tar.gz from /var/cache/oracle-jdk7-installer/ where XX is the version number.
3) Move the downloaded version into /var/cache/oracle-jdk7-installer/ using the following command
sudo mv jdk-7u(downloadedversion)-linux-x64.tar.gz /var/cache/oracle-jdk7-installer/
4) Now run the following command
sudo apt-get install oracle-java7-installer
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment