为什么这个一直想安装Java 7?我不想要 Java 7,我可以以某种方式阻止它尝试吗?

为什么这个一直想安装Java 7?我不想要 Java 7,我可以以某种方式阻止它尝试吗?

为什么它一直想安装oracle-java7-installer?有什么方法可以阻止它尝试这样做吗?

home@home-Vostro-220s-Series:~$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  printer-driver-postscript-hp
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]? Y
Setting up oracle-java7-installer (7u51-0~webupd8~1) ...
Downloading Oracle Java 7...
--2014-07-26 18:26:07--  http://download.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 219.76.14.26, 219.76.14.9
Connecting to download.oracle.com (download.oracle.com)|219.76.14.26|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz [following]
--2014-07-26 18:26:07--  https://edelivery.oracle.com/otn-pub/java/jdk/7u51-b13/jdk-7u51-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 23.41.102.140
Connecting to edelivery.oracle.com (edelivery.oracle.com)|23.41.102.140|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/errors/download-fail-1505220.html [following]
--2014-07-26 18:26:08--  http://download.oracle.com/errors/download-fail-1505220.html
Connecting to download.oracle.com (download.oracle.com)|219.76.14.26|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5307 (5.2K) [text/html]
Saving to: `jdk-7u51-linux-x64.tar.gz'

     0K                                                      100% 38.3M=0s

2014-07-26 18:26:08 (38.3 MB/s) - `jdk-7u51-linux-x64.tar.gz' saved [5307/5307]

Download done.
Removing outdated cached downloads...
sha256sum mismatch jdk-7u51-linux-x64.tar.gz
Oracle JDK 7 is NOT installed.
dpkg: error processing oracle-java7-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 oracle-java7-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)
home@home-Vostro-220s-Series:~$ 

答案1

您安装了一个名为 的软件包oracle-java7-installer,它会在安装过程中下载 Oracle JDK 7。当您运行时apt-get upgrade,它会完成任何部分安装的软件包的安装;您可以运行apt-get install来执行此操作,而无需升级任何软件包(通常,这不会执行任何操作,因为所有软件包都已完全安装)。如果您不需要 Java 7,请删除此软件包:

apt-get remove oracle-java7-installer

相关内容