Oracle Java 安装失败后出现 apt-get 错误

Oracle Java 安装失败后出现 apt-get 错误

在 Oracle JDK 7 安装失败后,我开始在使用安装软件包时遇到错误。apt-get即使我安装与 Java 无关的软件包,也会出现这些错误。由于某种原因,每次我安装某些东西时,apt-get 都会尝试安装 jdk(并失败)。这是我尝试安装 vim 时的输出:我该如何解决这个问题?

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  ctags vim-doc vim-scripts
The following NEW packages will be installed:
  vim
0 upgraded, 1 newly installed, 0 to remove and 45 not upgraded.
1 not fully installed or removed.
Need to get 1 036 kB of archives.
After this operation, 2 458 kB of additional disk space will be used.
Get:1 http://lv.archive.ubuntu.com/ubuntu xenial-updates/main amd64 vim amd64 2:7.4.1689-3ubuntu1.2 [1 036 kB]
Fetched 1 036 kB in 0s (1 778 kB/s)
Selecting previously unselected package vim.
(Reading database ... 266223 files and directories currently installed.)
Preparing to unpack .../vim_2%3a7.4.1689-3ubuntu1.2_amd64.deb ...
Unpacking vim (2:7.4.1689-3ubuntu1.2) ...
Setting up oracle-java7-installer (7u80+7u60arm-0~webupd8~1) ...
Downloading Oracle Java 7...
--2017-12-09 21:57:26--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
Resolving download.oracle.com (download.oracle.com)... 81.198.165.219, 81.198.165.233
Connecting to download.oracle.com (download.oracle.com)|81.198.165.219|: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-12-09 21:57:26--  https://edelivery.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 184.86.54.138, 2a02:26f0:18:489::2d3e, 2a02:26f0:18:499::2d3e
Connecting to edelivery.oracle.com (edelivery.oracle.com)|184.86.54.138|: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=1512849566_e3b01a3ab3696363f4f5cbd105ec04d6 [following]
--2017-12-09 21:57:26--  http://download.oracle.com/otn-pub/java/jdk/7u80-b15/jdk-7u80-linux-x64.tar.gz?AuthParam=1512849566_e3b01a3ab3696363f4f5cbd105ec04d6
Connecting to download.oracle.com (download.oracle.com)|81.198.165.219|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-12-09 21:57:26 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
Setting up vim (2:7.4.1689-3ubuntu1.2) ...
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vim (vim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vimdiff (vimdiff) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rvim (rvim) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/rview (rview) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/vi (vi) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/view (view) in auto mode
update-alternatives: using /usr/bin/vim.basic to provide /usr/bin/ex (ex) in auto mode
Errors were encountered while processing:
 oracle-java7-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)

相关内容