2017-07-15 44 views
0

我想安裝一個我知道沒有支持的Java版本,但是一些應用程序抱怨說它需要Java 6.我無法安裝6,所以我嘗試了Java 8.我的系統正在運行Ubuntu 14.04。我在安裝Java 8時如何獲取版本6的Java錯誤?

我發出的這些指令

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

我得到這個錯誤對Java 6,我刪除了文件夾/usr/lib/jvm,但我仍然得到這個錯誤。

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) 

在Ubuntu上,Java 6有什麼好的選擇嗎?爲什麼當我沒有安裝它時,錯誤會顯示Java 6的相關信息?

+0

'下載失敗 的Oracle JDK 6不installed.' - 的Java6不會因下載安裝的問題。看起來這個位置不再可用。也許安裝Java6分別解決了安裝問題。 –

回答

0

你嘗試安裝JDK 6和7前8,像這樣:

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