我想将 Java 8 更改为 Java 7。我计划首先删除 Java 8。我运行以下命令
sudo apt-get purge oracle-java8-installer
我收到以下错误
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
linux-signed-image-3.16.0-34-generic : Depends: linux-image-3.16.0-34-generic (= 3.16.0-34.47) but 3.16.0-34.45 is to be installed
oracle-java8-set-default : Depends: oracle-java8-installer but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
并尝试
apt-get -f 安装
我收到以下错误
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
linux-headers-3.16.0-31 linux-headers-3.16.0-31-generic linux-image-3.16.0-31-generic linux-image-extra-3.16.0-31-generic linux-signed-image-3.16.0-31-generic
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
linux-image-3.16.0-34-generic
Suggested packages:
fdutils linux-doc-3.16.0 linux-source-3.16.0 linux-tools
The following packages will be upgraded:
linux-image-3.16.0-34-generic
1 upgraded, 0 newly installed, 0 to remove and 142 not upgraded.
6 not fully installed or removed.
Need to get 0 B/16.2 MB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 405456 files and directories currently installed.)
Preparing to unpack .../linux-image-3.16.0-34-generic_3.16.0-34.47_amd64.deb ...
Done.
Unpacking linux-image-3.16.0-34-generic (3.16.0-34.47) over (3.16.0-34.45) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-3.16.0-34-generic_3.16.0-34.47_amd64.deb (--unpack):
cannot copy extracted data for './boot/System.map-3.16.0-34-generic' to '/boot/System.map-3.16.0-34-generic.dpkg-new': unexpected end of file or stream
dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.16.0-34-generic /boot/vmlinuz-3.16.0-34-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.16.0-34-generic /boot/vmlinuz-3.16.0-34-generic
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-3.16.0-34-generic_3.16.0-34.47_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
我也无法安装 Java 7。我的问题是什么?如何解决?请帮忙