软件更新不起作用?

软件更新不起作用?

由于某种原因,软件更新根本不起作用。当我尝试更新系统时,它会启动并冻结很长时间。每次我尝试更新或安装某些软件包时,我都会看到以下消息:

Results:` No apport report written because MaxReports is reached already 
Errors were encountered while processing: 
java-common 
openjdk-8-jre-headless:amd64 
update-notifier-common 
flashplugin-installer 
openjdk-8-jre:amd64 
openjdk-8-jdk-headless:amd64 
openjdk-8-jdk:amd64 
update-notifier 
update-manager 
ubuntu-release-upgrader-gtk 
ca-certificates-java E: 
Sub-process /usr/bin/dpkg returned an error

我的 Java 出了点问题,但我不知道该如何修复。有什么想法吗?

我尝试过“sudo apt update”。结果是:

Hit:1 http://ua.archive.ubuntu.com/ubuntu xenial InRelease
Get:2 http://ua.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]    
Get:3 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]     
Get:4 http://ua.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]  
Hit:5 http://ppa.launchpad.net/yannubuntu/boot-repair/ubuntu xenial InRelease  
Get:6 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [472 kB]
Get:7 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main i386 Packages [463 kB]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [68,0 kB]
Get:9 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [43,1 kB]
Get:10 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [32,1 kB]
Get:11 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 DEP-11 Metadata [305 kB]
Get:12 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 64x64 Icons [37,0 kB]
Get:13 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main DEP-11 64x64 Icons [192 kB]
Get:14 http://ua.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [397 kB]
Get:15 http://ua.archive.ubuntu.com/ubuntu xenial-updates/universe i386 Packages [392 kB]
Get:16 http://ua.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 DEP-11 Metadata [133 kB]
Get:17 http://ua.archive.ubuntu.com/ubuntu xenial-updates/universe DEP-11 64x64 Icons [162 kB]
Get:18 http://ua.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 DEP-11 Metadata [2 520 B]
Get:19 http://ua.archive.ubuntu.com/ubuntu xenial-backports/main amd64 DEP-11 Metadata [3 328 B]
Fetched 3 009 kB in 1s (2 127 kB/s)                                       
Reading package lists... Done
Building dependency tree       
Reading state information... Done
32 packages can be upgraded. Run 'apt list --upgradable' to see them.

我尝试过“sudo apt upgrade”。结果是:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
  ubuntu-core-launcher
Use 'sudo apt autoremove' to remove it.
The following NEW packages will be installed:
  linux-headers-4.4.0-62 linux-headers-4.4.0-62-generic
  linux-image-4.4.0-62-generic linux-image-extra-4.4.0-62-generic
The following packages will be upgraded:
  bind9-host dnsutils flashplugin-installer gir1.2-javascriptcoregtk-4.0
  gir1.2-webkit2-4.0 libavcodec-ffmpeg56 libavfilter-ffmpeg5
  libavformat-ffmpeg56 libavresample-ffmpeg2 libavutil-ffmpeg54 libbind9-140
  libdns-export162 libdns162 libgc1c2 libisc-export160 libisc160 libisccc140
  libisccfg140 libjavascriptcoregtk-4.0-18 liblwres141 libpostproc-ffmpeg53
  libssh2-1 libswresample-ffmpeg1 libswscale-ffmpeg3 libwebkit2gtk-4.0-37
  libwebkit2gtk-4.0-37-gtk2 linux-generic linux-headers-generic
  linux-image-generic snap-confine snapd ubuntu-core-launcher
32 upgraded, 4 newly installed, 0 to remove and 0 not upgraded.
11 not fully installed or removed.
Need to get 108 MB of archives.
After this operation, 298 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://ua.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 flashplugin-installer amd64 24.0.0.221ubuntu0.16.04.1 [6 812 B]
Get:2 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 gir1.2-webkit2-4.0 amd64 2.14.5-0ubuntu0.16.04.1 [64,2 kB]
Get:3 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 gir1.2-javascriptcoregtk-4.0 amd64 2.14.5-0ubuntu0.16.04.1 [21,5 kB]
Get:4 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libwebkit2gtk-4.0-37-gtk2 amd64 2.14.5-0ubuntu0.16.04.1 [8 316 kB]
Get:5 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libwebkit2gtk-4.0-37 amd64 2.14.5-0ubuntu0.16.04.1 [10,2 MB]
Get:6 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libjavascriptcoregtk-4.0-18 amd64 2.14.5-0ubuntu0.16.04.1 [3 710 kB]
Get:7 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 snapd amd64 2.22.2 [8 567 kB]
Get:8 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 ubuntu-core-launcher amd64 2.22.2 [1 580 B]
Get:9 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 snap-confine amd64 2.22.2 [41,6 kB]
Get:10 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libisc-export160 amd64 1:9.10.3.dfsg.P4-8ubuntu1.5 [153 kB]
Get:11 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libdns-export162 amd64 1:9.10.3.dfsg.P4-8ubuntu1.5 [665 kB]
Get:12 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 bind9-host amd64 1:9.10.3.dfsg.P4-8ubuntu1.5 [38,4 kB]
Get:13 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 dnsutils amd64 1:9.10.3.dfsg.P4-8ubuntu1.5 [88,9 kB]
Get:14 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libisc160 amd64 1:9.10.3.dfsg.P4-8ubuntu1.5 [214 kB]
Get:15 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libdns162 amd64 1:9.10.3.dfsg.P4-8ubuntu1.5 [877 kB]
Get:16 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libisccc140 amd64 1:9.10.3.dfsg.P4-8ubuntu1.5 [16,2 kB]
Get:17 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libisccfg140 amd64 1:9.10.3.dfsg.P4-8ubuntu1.5 [40,4 kB]
Get:18 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 liblwres141 amd64 1:9.10.3.dfsg.P4-8ubuntu1.5 [33,5 kB]
Get:19 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libbind9-140 amd64 1:9.10.3.dfsg.P4-8ubuntu1.5 [23,6 kB]
Get:20 http://ua.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 libavresample-ffmpeg2 amd64 7:2.8.11-0ubuntu0.16.04.1 [51,9 kB]
Get:21 http://ua.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 libswresample-ffmpeg1 amd64 7:2.8.11-0ubuntu0.16.04.1 [51,7 kB]
Get:22 http://ua.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 libpostproc-ffmpeg53 amd64 7:2.8.11-0ubuntu0.16.04.1 [49,0 kB]
Get:23 http://ua.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 libswscale-ffmpeg3 amd64 7:2.8.11-0ubuntu0.16.04.1 [146 kB]
Get:24 http://ua.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 libavformat-ffmpeg56 amd64 7:2.8.11-0ubuntu0.16.04.1 [807 kB]
Get:25 http://ua.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 libavfilter-ffmpeg5 amd64 7:2.8.11-0ubuntu0.16.04.1 [530 kB]
Get:26 http://ua.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 libavcodec-ffmpeg56 amd64 7:2.8.11-0ubuntu0.16.04.1 [4 081 kB]
Get:27 http://ua.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 libavutil-ffmpeg54 amd64 7:2.8.11-0ubuntu0.16.04.1 [166 kB]
Get:28 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libgc1c2 amd64 1:7.4.2-7.3ubuntu0.1 [82,1 kB]
Get:29 http://ua.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 libssh2-1 amd64 1.5.0-2ubuntu0.1 [70,2 kB]
Get:30 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-image-4.4.0-62-generic amd64 4.4.0-62.83 [21,3 MB]
Get:31 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-image-extra-4.4.0-62-generic amd64 4.4.0-62.83 [36,3 MB]
Get:32 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-generic amd64 4.4.0.62.65 [1 784 B]
Get:33 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-image-generic amd64 4.4.0.62.65 [2 290 B]
Get:34 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-headers-4.4.0-62 all 4.4.0-62.83 [9 907 kB]
Get:35 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-headers-4.4.0-62-generic amd64 4.4.0-62.83 [773 kB]
Get:36 http://ua.archive.ubuntu.com/ubuntu xenial-updates/main amd64 linux-headers-generic amd64 4.4.0.62.65 [2 256 B]
Fetched 108 MB in 43s (2 464 kB/s)                                             
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 240302 files and directories currently installed.)
Preparing to unpack .../flashplugin-installer_24.0.0.221ubuntu0.16.04.1_amd64.deb ...
Unpacking flashplugin-installer (24.0.0.221ubuntu0.16.04.1) over (24.0.0.194ubuntu0.16.04.1) ...
Preparing to unpack .../gir1.2-webkit2-4.0_2.14.5-0ubuntu0.16.04.1_amd64.deb ...
Unpacking gir1.2-webkit2-4.0:amd64 (2.14.5-0ubuntu0.16.04.1) over (2.14.3-0ubuntu0.16.04.1) ...
Preparing to unpack .../gir1.2-javascriptcoregtk-4.0_2.14.5-0ubuntu0.16.04.1_amd64.deb ...
Unpacking gir1.2-javascriptcoregtk-4.0:amd64 (2.14.5-0ubuntu0.16.04.1) over (2.14.3-0ubuntu0.16.04.1) ...
Preparing to unpack .../libwebkit2gtk-4.0-37-gtk2_2.14.5-0ubuntu0.16.04.1_amd64.deb ...
Unpacking libwebkit2gtk-4.0-37-gtk2:amd64 (2.14.5-0ubuntu0.16.04.1) over (2.14.3-0ubuntu0.16.04.1) ...
Preparing to unpack .../libwebkit2gtk-4.0-37_2.14.5-0ubuntu0.16.04.1_amd64.deb ...
Unpacking libwebkit2gtk-4.0-37:amd64 (2.14.5-0ubuntu0.16.04.1) over (2.14.3-0ubuntu0.16.04.1) ...
Preparing to unpack .../libjavascriptcoregtk-4.0-18_2.14.5-0ubuntu0.16.04.1_amd64.deb ...
Unpacking libjavascriptcoregtk-4.0-18:amd64 (2.14.5-0ubuntu0.16.04.1) over (2.14.3-0ubuntu0.16.04.1) ...
Preparing to unpack .../snapd_2.22.2_amd64.deb ...
Warning: Stopping snapd.service, but it can still be activated by:
  snapd.socket
Unpacking snapd (2.22.2) over (2.21) ...
Preparing to unpack .../ubuntu-core-launcher_2.22.2_amd64.deb ...
Unpacking ubuntu-core-launcher (2.22.2) over (2.21) ...
Preparing to unpack .../snap-confine_2.22.2_amd64.deb ...
Unpacking snap-confine (2.22.2) over (2.21) ...
Preparing to unpack .../libisc-export160_1%3a9.10.3.dfsg.P4-8ubuntu1.5_amd64.deb ...
Unpacking libisc-export160 (1:9.10.3.dfsg.P4-8ubuntu1.5) over (1:9.10.3.dfsg.P4-8ubuntu1.4) ...
Preparing to unpack .../libdns-export162_1%3a9.10.3.dfsg.P4-8ubuntu1.5_amd64.deb ...
Unpacking libdns-export162 (1:9.10.3.dfsg.P4-8ubuntu1.5) over (1:9.10.3.dfsg.P4-8ubuntu1.4) ...
Preparing to unpack .../bind9-host_1%3a9.10.3.dfsg.P4-8ubuntu1.5_amd64.deb ...
Unpacking bind9-host (1:9.10.3.dfsg.P4-8ubuntu1.5) over (1:9.10.3.dfsg.P4-8ubuntu1.4) ...
Preparing to unpack .../dnsutils_1%3a9.10.3.dfsg.P4-8ubuntu1.5_amd64.deb ...
Unpacking dnsutils (1:9.10.3.dfsg.P4-8ubuntu1.5) over (1:9.10.3.dfsg.P4-8ubuntu1.4) ...
Preparing to unpack .../libisc160_1%3a9.10.3.dfsg.P4-8ubuntu1.5_amd64.deb ...
Unpacking libisc160:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.5) over (1:9.10.3.dfsg.P4-8ubuntu1.4) ...
Preparing to unpack .../libdns162_1%3a9.10.3.dfsg.P4-8ubuntu1.5_amd64.deb ...
Unpacking libdns162:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.5) over (1:9.10.3.dfsg.P4-8ubuntu1.4) ...
Preparing to unpack .../libisccc140_1%3a9.10.3.dfsg.P4-8ubuntu1.5_amd64.deb ...
Unpacking libisccc140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.5) over (1:9.10.3.dfsg.P4-8ubuntu1.4) ...
Preparing to unpack .../libisccfg140_1%3a9.10.3.dfsg.P4-8ubuntu1.5_amd64.deb ...
Unpacking libisccfg140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.5) over (1:9.10.3.dfsg.P4-8ubuntu1.4) ...
Preparing to unpack .../liblwres141_1%3a9.10.3.dfsg.P4-8ubuntu1.5_amd64.deb ...
Unpacking liblwres141:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.5) over (1:9.10.3.dfsg.P4-8ubuntu1.4) ...
Preparing to unpack .../libbind9-140_1%3a9.10.3.dfsg.P4-8ubuntu1.5_amd64.deb ...
Unpacking libbind9-140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.5) over (1:9.10.3.dfsg.P4-8ubuntu1.4) ...
Preparing to unpack .../libavresample-ffmpeg2_7%3a2.8.11-0ubuntu0.16.04.1_amd64.deb ...
Unpacking libavresample-ffmpeg2:amd64 (7:2.8.11-0ubuntu0.16.04.1) over (7:2.8.10-0ubuntu0.16.04.1) ...
Preparing to unpack .../libswresample-ffmpeg1_7%3a2.8.11-0ubuntu0.16.04.1_amd64.deb ...
Unpacking libswresample-ffmpeg1:amd64 (7:2.8.11-0ubuntu0.16.04.1) over (7:2.8.10-0ubuntu0.16.04.1) ...
Preparing to unpack .../libpostproc-ffmpeg53_7%3a2.8.11-0ubuntu0.16.04.1_amd64.deb ...
Unpacking libpostproc-ffmpeg53:amd64 (7:2.8.11-0ubuntu0.16.04.1) over (7:2.8.10-0ubuntu0.16.04.1) ...
Preparing to unpack .../libswscale-ffmpeg3_7%3a2.8.11-0ubuntu0.16.04.1_amd64.deb ...
Unpacking libswscale-ffmpeg3:amd64 (7:2.8.11-0ubuntu0.16.04.1) over (7:2.8.10-0ubuntu0.16.04.1) ...
Preparing to unpack .../libavformat-ffmpeg56_7%3a2.8.11-0ubuntu0.16.04.1_amd64.deb ...
Unpacking libavformat-ffmpeg56:amd64 (7:2.8.11-0ubuntu0.16.04.1) over (7:2.8.10-0ubuntu0.16.04.1) ...
Preparing to unpack .../libavfilter-ffmpeg5_7%3a2.8.11-0ubuntu0.16.04.1_amd64.deb ...
Unpacking libavfilter-ffmpeg5:amd64 (7:2.8.11-0ubuntu0.16.04.1) over (7:2.8.10-0ubuntu0.16.04.1) ...
Preparing to unpack .../libavcodec-ffmpeg56_7%3a2.8.11-0ubuntu0.16.04.1_amd64.deb ...
Unpacking libavcodec-ffmpeg56:amd64 (7:2.8.11-0ubuntu0.16.04.1) over (7:2.8.10-0ubuntu0.16.04.1) ...
Preparing to unpack .../libavutil-ffmpeg54_7%3a2.8.11-0ubuntu0.16.04.1_amd64.deb ...
Unpacking libavutil-ffmpeg54:amd64 (7:2.8.11-0ubuntu0.16.04.1) over (7:2.8.10-0ubuntu0.16.04.1) ...
Preparing to unpack .../libgc1c2_1%3a7.4.2-7.3ubuntu0.1_amd64.deb ...
Unpacking libgc1c2:amd64 (1:7.4.2-7.3ubuntu0.1) over (1:7.4.2-7.3) ...
Preparing to unpack .../libssh2-1_1.5.0-2ubuntu0.1_amd64.deb ...
Unpacking libssh2-1:amd64 (1.5.0-2ubuntu0.1) over (1.5.0-2) ...
Selecting previously unselected package linux-image-4.4.0-62-generic.
Preparing to unpack .../linux-image-4.4.0-62-generic_4.4.0-62.83_amd64.deb ...
Examining /etc/kernel/preinst.d/
run-parts: executing /etc/kernel/preinst.d/intel-microcode 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
Done.
Unpacking linux-image-4.4.0-62-generic (4.4.0-62.83) ...
Selecting previously unselected package linux-image-extra-4.4.0-62-generic.
Preparing to unpack .../linux-image-extra-4.4.0-62-generic_4.4.0-62.83_amd64.deb ...
Unpacking linux-image-extra-4.4.0-62-generic (4.4.0-62.83) ...
Preparing to unpack .../linux-generic_4.4.0.62.65_amd64.deb ...
Unpacking linux-generic (4.4.0.62.65) over (4.4.0.57.60) ...
Preparing to unpack .../linux-image-generic_4.4.0.62.65_amd64.deb ...
Unpacking linux-image-generic (4.4.0.62.65) over (4.4.0.57.60) ...
Selecting previously unselected package linux-headers-4.4.0-62.
Preparing to unpack .../linux-headers-4.4.0-62_4.4.0-62.83_all.deb ...
Unpacking linux-headers-4.4.0-62 (4.4.0-62.83) ...
Selecting previously unselected package linux-headers-4.4.0-62-generic.
Preparing to unpack .../linux-headers-4.4.0-62-generic_4.4.0-62.83_amd64.deb ...
Unpacking linux-headers-4.4.0-62-generic (4.4.0-62.83) ...
Preparing to unpack .../linux-headers-generic_4.4.0.62.65_amd64.deb ...
Unpacking linux-headers-generic (4.4.0.62.65) over (4.4.0.57.60) ...
Processing triggers for libc-bin (2.23-0ubuntu5) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up java-common (0.56ubuntu2) ...
mkdir: cannot create directory ‘/etc/.java/.systemPrefs’: File exists
dpkg: error processing package java-common (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of openjdk-8-jre-headless:amd64:
 openjdk-8-jre-headless:amd64 depends on java-common (>= 0.28); however:
  Package java-common is not configured yet.

dpkg: error processing package openjdk-8-jre-headless:amd64 (--configure):
 dependency problems - leaving unconfigured
Setting up update-notifier-common (3.168.3) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                          Traceback (most recent call last):
  File "/usr/lib/update-notifier/package-data-downloader", line 24, in <module>
    import debian.deb822
ModuleNotFoundError: No module named 'debian'
dpkg: error processing package update-notifier-common (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of flashplugin-installer:
 flashplugin-installer depends on update-notifier-common (>= 0.119ubuntu2); however:
  Package update-notifier-common is not configured yet.

dpkg: error processing package flashplugin-installer (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openjdk-8-jre:amd64:
 openjdk-8-jre:amd64 depends on openjdk-8-jre-headless (= 8u121-b13-0ubuntu1.16.04.2); however:
  Package openjdk-8-jre-headless:amd64 is not configured yet.

dpkg: error processing package openjdk-8-jre:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openjdk-8-jdk-headless:amd64:
 openjdk-8-jdk-headless:amd64 depends on openjdk-8-jre-headless (= 8u121-b13-0ubuntu1.16.04.2); however:
  Package openjdk-8-jre-headless:amd64 is not configured yet.

dpkg: error processing package openjdk-8-jdk-headless:amd64 (--configure):
 dependency prNo apport report written because MaxReports is reached already
                                                                            No apport report written because MaxReports is reached already
                                                          No apport report written because MaxReports is reached already
                                        No apport report written because MaxReports is reached already
                      oblems - leaving unconfigured
dpkg: dependency problems prevent configuration of openjdk-8-jdk:amd64:
 openjdk-8-jdk:amd64 depends on openjdk-8-jre (= 8u121-b13-0ubuntu1.16.04.2); however:
  Package openjdk-8-jre:amd64 is not configured yet.
 openjdk-8-jdk:amd64 depends on openjdk-8-jdk-headless (= 8u121-b13-0ubuntu1.16.04.2); however:
  Package openjdk-8-jdk-headless:amd64 is not configured yet.

dpkg: error processing package openjdk-8-jdk:amd64 (--configure):
 dependency problems - leaving unconfigured
Setting up gir1.2-javascriptcoregtk-4.0:amd64 (2.14.5-0ubuntu0.16.04.1) ...
Setting up libjavascriptcoregtk-4.0-18:amd64 (2.14.5-0ubuntu0.16.04.1) ...
Setting up libwebkit2gtk-4.0-37:amd64 (2.14.5-0ubuntu0.16.04.1) ...
Setting up gir1.2-webkit2-4.0:amd64 (2.14.5-0ubuntu0.16.04.1) ...
dpkg: dependency problems prevent configuration of update-notifier:
 update-notifier depends on update-notifier-common (= 3.168.3); however:
  Package update-notifier-common is not configured yet.

dpkg: error processing package update-notifier (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of update-manager:
 update-manager depends on update-notifier; however:
  Package update-notifier is not configured yet.

No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                            dpkg: error processing package update-manager (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ubuntu-release-upgrader-gtk:
 ubuntu-release-upgrader-gtk depends on update-manager; however:
  Package update-manager is not configured yet.

dpkg: error processing package ubuntu-release-upgrader-gtk (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Setting up libwebkit2gtk-4.0-37-gtk2:amd64 (2.14.5-0ubuntu0.16.04.1) ...
Setting up snap-confine (2.22.2) ...
Setting up snapd (2.22.2) ...
Setting up ubuntu-core-launcher (2.22.2) ...
Setting up libisc-export160 (1:9.10.3.dfsg.P4-8ubuntu1.5) ...
Setting up libdns-export162 (1:9.10.3.dfsg.P4-8ubuntu1.5) ...
Setting up libisc160:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.5) ...
Setting up libdns162:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.5) ...
Setting up libisccc140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.5) ...
Setting up libisccfg140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.5) ...
Setting up libbind9-140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.5) ...
Setting up liblwres141:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.5) ...
Setting up bind9-host (1:9.10.3.dfsg.P4-8ubuntu1.5) ...
Setting up dnsutils (1:9.10.3.dfsg.P4-8ubuntu1.5) ...
Setting up libavutil-ffmpeg54:amd64 (7:2.8.11-0ubuntu0.16.04.1) ...
Setting up libavresample-ffmpeg2:amd64 (7:2.8.11-0ubuntu0.16.04.1) ...
Setting up libswresample-ffmpeg1:amd64 (7:2.8.11-0ubuntu0.16.04.1) ...
Setting up libpostproc-ffmpeg53:amd64 (7:2.8.11-0ubuntu0.16.04.1) ...
Setting up libswscale-ffmpeg3:amd64 (7:2.8.11-0ubuntu0.16.04.1) ...
Setting up libavcodec-ffmpeg56:amd64 (7:2.8.11-0ubuntu0.16.04.1) ...
Setting up libavformat-ffmpeg56:amd64 (7:2.8.11-0ubuntu0.16.04.1) ...
Setting up libavfilter-ffmpeg5:amd64 (7:2.8.11-0ubuntu0.16.04.1) ...
Setting up libgc1c2:amd64 (1:7.4.2-7.3ubuntu0.1) ...
Setting up libssh2-1:amd64 (1.5.0-2ubuntu0.1) ...
Setting up linux-image-4.4.0-62-generic (4.4.0-62.83) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-62-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-62-generic
Found initrd image: /boot/initrd.img-4.4.0-62-generic
Found linux image: /boot/vmlinuz-4.4.0-57-generic
Found initrd image: /boot/initrd.img-4.4.0-57-generic
Found linux image: /boot/vmlinuz-4.4.0-53-generic
Found initrd image: /boot/initrd.img-4.4.0-53-generic
Found linux image: /boot/vmlinuz-4.4.0-31-generic
Found initrd image: /boot/initrd.img-4.4.0-31-generic
Found Windows 10 (loader) on /dev/sda1
Found Ubuntu 16.04.1 LTS (16.04) on /dev/sda9
Found Ubuntu 14.04.4 LTS (14.04) on /dev/sdb1
Found Windows 10 (loader) on /dev/sdc2
done
Setting up linux-image-extra-4.4.0-62-generic (4.4.0-62.83) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-62-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-62-generic /boot/vmlinuz-4.4.0-62-generic
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-4.4.0-62-generic
Found initrd image: /boot/initrd.img-4.4.0-62-generic
Found linux image: /boot/vmlinuz-4.4.0-57-generic
Found initrd image: /boot/initrd.img-4.4.0-57-generic
Found linux image: /boot/vmlinuz-4.4.0-53-generic
Found initrd image: /boot/initrd.img-4.4.0-53-generic
Found linux image: /boot/vmlinuz-4.4.0-31-generic
Found initrd image: /boot/initrd.img-4.4.0-31-generic
Found Windows 10 (loader) on /dev/sda1
Found Ubuntu 16.04.1 LTS (16.04) on /dev/sda9
Found Ubuntu 14.04.4 LTS (14.04) on /dev/sdb1
Found Windows 10 (loader) on /dev/sdc2
done
Setting up linux-image-generic (4.4.0.62.65) ...
Setting up linux-headers-4.4.0-62 (4.4.0-62.83) ...
Setting up linux-headers-4.4.0-62-generic (4.4.0-62.83) ...
Setting up linux-headers-generic (4.4.0.62.65) ...
Setting up linux-generic (4.4.0.62.65) ...
dpkg: dependency problems prevent configuration of ca-certificates-java:
 ca-certificates-java depends on openjdk-7-jre-headless (>= 7~u3-2.1.1~pre1-1) | java7-runtime-headless; however:
  Package openjdk-7-jre-headless is not installed.
  Package java7-runtime-headless is not installed.
  Package openjdk-8-jre-headless:amd64 which provides java7-runtime-headless is not configured yet.

dpkg: error processing package ca-certificates-java (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              Processing triggers for libc-bin (2.23-0ubuntu5) ...
Errors were encountered while processing:
 java-common
 openjdk-8-jre-headless:amd64
 update-notifier-common
 flashplugin-installer
 openjdk-8-jre:amd64
 openjdk-8-jdk-headless:amd64
 openjdk-8-jdk:amd64
 update-notifier
 update-manager
 ubuntu-release-upgrader-gtk
 ca-certificates-java
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

问题的原因在于第一个错误消息:

Setting up java-common (0.56ubuntu2) ...
mkdir: cannot create directory ‘/etc/.java/.systemPrefs’: File exists
dpkg: error processing package java-common (--configure):
 subprocess installed post-installation script returned error exit status 1

java-common 包卡住了,因为您在之前尝试安装 Java 后没有进行清理。

删除 /etc/.java,然后安装就可以正常工作。

相关内容