简体   繁体   中英

How am I getting this Java error for version 6 when I am installing Java 8?

I am trying to install a version of Java of which I know there is no support, but some application complains that it needs Java 6. I wasn't able to install 6, so I tried with Java 8. My system is running Ubuntu 14.04.

I issued these commands

$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer

I got this error for Java 6. I removed the folders in /usr/lib/jvm , but I'm still getting this error.

Reading package lists... Done
Building dependency tree       
Reading state information... Done
oracle-java8-installer is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 1 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] 
Setting up oracle-java6-installer (6u45-0~webupd8~8) ...
Downloading Oracle Java 6...
--2017-07-15 15:33:19--  http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin
Resolving download.oracle.com (download.oracle.com)... 123.176.33.9, 123.176.33.24
Connecting to download.oracle.com (download.oracle.com)|123.176.33.9|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin [following]
--2017-07-15 15:33:19--  https://edelivery.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin
Resolving edelivery.oracle.com (edelivery.oracle.com)... 104.81.23.175, 2600:140f:9:193::2d3e, 2600:140f:9:18c::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|104.81.23.175|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin?AuthParam=1500113119_9e1f905b16af4c6074312044fd9dce8e [following]
--2017-07-15 15:33:19--  http://download.oracle.com/otn-pub/java/jdk/6u45-b06/jdk-6u45-linux-x64.bin?AuthParam=1500113119_9e1f905b16af4c6074312044fd9dce8e
Connecting to download.oracle.com (download.oracle.com)|123.176.33.9|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-07-15 15:33:21 ERROR 404: Not Found.

download failed
Oracle JDK 6 is NOT installed.
dpkg: error processing package oracle-java6-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 oracle-java6-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)

Are there any good alternatives for Java 6 on Ubuntu? Why does the error show things about Java 6 when I am not installing it?

Did you try installing JDK 6 and 7 before 8 like so:

sudo apt-get install oracle-java6-installer
sudo apt-get install oracle-java7-installer

You could use the Zulu JDK from Azul. This is a TCK certified build of OpenJDK and completely free.

Instructions for installation from the repo can be found here:

http://zulu.org/zuludocs-folder/Content/ZuluInstallationGuide/InstallingZulu/InstallOnLinuxUsingAPTRepository.htm

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