1

I was setting up up android-studio referring to this website. While installing oracle-java7-installer, this error is displayed:

sudo apt-get install oracle-java7-installer
[sudo] password for cyan: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
oracle-java7-installer is already the newest version (7u80+7u60arm-0~webupd8~1).
The following package was automatically installed and is no longer required:
  snap-confine
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up oracle-java7-installer (7u80+7u60arm-0~webupd8~1) ...
Downloading Oracle Java 7...
--2017-11-27 08:40:47--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 223.223.158.138, 223.223.158.136
Connecting to download.oracle.com (download.oracle.com)|223.223.158.138|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz [following]
--2017-11-27 08:40:47--  https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.58.58.93, 2600:140f:7:18e::2d3e, 2600:140f:7:18d::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.58.58.93|:443... connected.
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=1511752368_824528560c20825821ecbcac8f4e9be9 [following]
--2017-11-27 08:40:48--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1511752368_824528560c20825821ecbcac8f4e9be9
Connecting to download.oracle.com (download.oracle.com)|223.223.158.138|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-11-27 08:40:50 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)

How do I fix this error? I did a fresh installation of Ubuntu 16.04.

3
  • I guess oracle-java7 is not supported anymore, I tried to replicate your error, I too received the same error. http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1511756970_d85220b978ff24d21f0f3970cbf4248a Connecting to download.oracle.com (download.oracle.com)|202.83.21.234|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2017-11-27 04:27:32 ERROR 404: Not Found. The dpkg error as Errors were encountered while processing: oracle-java7-installer E: Sub-process /usr/bin/dpkg returned an error code (1)
    – Bidyut
    Nov 27, 2017 at 4:28
  • i guess oracle does not provide packages for ubuntu,where should I download them from?
    – cayn
    Nov 27, 2017 at 4:44
  • as mentioned by Chai T. Rex, install Oracle-Java 8
    – Bidyut
    Nov 27, 2017 at 4:44

1 Answer 1

2

Oracle's Java 7 reached End of Life in 2015 and is no longer available. Java 8 is the best-supported version, though Java 9 is stable now as well (though things like IntelliJ IDEA don't yet support Java 9).

1
  • java8 is downloading,thank you.
    – cayn
    Nov 27, 2017 at 4:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .