我是 Ubuntu 社区的新手。我在使用 17.04 时遇到了问题:即使运行了大多数推荐的脚本,我仍然无法解决以下错误。我该怎么办?
linux-signed-image-4.10.0-33-generic : Depends: linux-image-4.10.0-33-generic (= 4.10.0-33.37) but it is not going to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).
dingi3@dingi3-HP-Pavilion-15-Notebook-PC:~$ sudo apt --fix-broken install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed:
linux-image-4.10.0-33-generic
Suggested packages:
fdutils linux-doc-4.10.0 | linux-source-4.10.0 linux-tools
The following NEW packages will be installed:
linux-image-4.10.0-33-generic
0 to upgrade, 1 to newly install, 0 to remove and 57 not to upgrade.
14 not fully installed or removed.
Need to get 0 B/20.3 MB of archives.
After this operation, 70.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
(Reading database ... 472330 files and directories currently installed.)
Preparing to unpack .../linux-image-4.10.0-33-generic_4.10.0-33.37_amd64.deb ...
Examining /etc/kernel/preinst.d/
run-parts: executing /etc/kernel/preinst.d/intel-microcode 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
Done.
Unpacking linux-image-4.10.0-33-generic (4.10.0-33.37) ...
dpkg: error processing archive /var/cache/apt/archives/linux-image-4.10.0-33-generic_4.10.0-33.37_amd64.deb (--unpack):
cannot copy extracted data for './boot/vmlinuz-4.10.0-33-generic' to '/boot/vmlinuz-4.10.0-33-generic.dpkg-new': failed to write (No space left on device)
No apport report written because the error message indicates a disk full error
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 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.10.0-33-generic /boot/vmlinuz-4.10.0-33-generic
Errors were encountered while processing:
/var/cache/apt/archives/linux-image-4.10.0-33-generic_4.10.0-33.37_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
答案1
您是否检查/boot
过分区大小以及inode 使用情况因为这里明确提到failed to write (No space left on device)
,首先检查一下。
尝试后
sudo apt-get update –fix-missing
和
sudo dpkg –configure -a
和
sudo apt-get install -f
损坏软件包的问题仍然存在,解决方案是手动编辑 dpkg 状态文件。
$ sudo nano /var/lib/dpkg/status (you can use vim or gedit instead of nano)
找到损坏的包,删除有关它的整个信息块并保存文件。
您可以列出损坏的包裹:
dpkg -l | grep ^..r
rstate(第三个字段)表示:reinst-required(包损坏,需要重新安装)