Dpkg:错误无法安装/删除任何东西

Dpkg:错误无法安装/删除任何东西

我无法安装/删除任何东西。我尝试了很多解决方案,但到目前为止都没有效果。

$ sudo dpkg --configure -a

dpkg: error processing package linux-image-extra-4.4.0-43-generic
(--configure):  dependency problems - leaving unconfigured Errors were
encountered while processing:  linux-image-4.4.0-45-generic
linux-image-extra-4.4.0-45-generic  linux-image-4.4.0-43-generic
linux-image-extra-4.4.0-43-generic

我该如何解决这个问题?重新安装 Ubuntu 会更省时吗?

$ sudo apt-get -f install

Reading package lists... Done Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following additional packages will be installed: 
   libnet-dns-perl
The following packages will be REMOVED:
   linux-image-4.4.0-42-generic linux-image-extra-4.4.0-42-generic
The following NEW packages will be installed: 
   libnet-dns-perl
0 upgraded, 1 newly installed, 2 to remove and 47 not upgraded. 6 not fully installed or removed.
Need to get 0 B/266 kB of archives.
After this operation, 217 MB disk space will be freed. Do you want to continue? [Y/n] Y
(Reading database ... 438205 files and directories currently installed.)
Removing linux-image-extra-4.4.0-42-generic (4.4.0-42.62) ...
depmod: FATAL: could not load /boot/System.map-4.4.0-42-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-42-generic /boot/vmlinuz-4.4.0-42-generic 
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-42-generic    /boot/vmlinuz-4.4.0-42-generic 
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-42-generic /boot/vmlinuz-4.4.0-42-generic 
update-initramfs: Generating /boot/initrd.img-4.4.0-42-generic 
depmod: WARNING: could not open /var/tmp/mkinitramfs_MrUfuP/lib/modules/4.4.0-42-generic/modules.order: No such file or directory 
depmod: WARNING: could not open /var/tmp/mkinitramfs_MrUfuP/lib/modules/4.4.0-42-generic/modules.builtin: No such file or directory 
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-42-generic /boot/vmlinuz-4.4.0-42-generic 
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-42-generic /boot/vmlinuz-4.4.0-42-generic 
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-42-generic /boot/vmlinuz-4.4.0-42-generic 
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-42-generic /boot/vmlinuz-4.4.0-42-generic 
/usr/sbin/grub-mkconfig: 11: /etc/default/grub: i915.i915_enable_rc6=1: not found 
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 127
dpkg: error processing package linux-image-extra-4.4.0-42-generic
(--remove):  subprocess installed post-removal script returned error
exit status 1 Removing linux-image-4.4.0-42-generic (4.4.0-42.62) ...
Examining /etc/kernel/postrm.d . 
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-42-generic /boot/vmlinuz-4.4.0-42-generic 
update-initramfs: Deleting /boot/initrd.img-4.4.0-42-generic 
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-42-generic /boot/vmlinuz-4.4.0-42-generic 
/usr/sbin/grub-mkconfig: 11: /etc/default/grub: i915.i915_enable_rc6=1: not found 
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 127 Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-4.4.0-42-generic.postrm line 328. dpkg:
error processing package linux-image-4.4.0-42-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:

已安装的内核:

adriaan@Linux:~$ dpkg --list | grep linux-image

ii  linux-image-4.4.0-31-generic                 4.4.0-31.50                                                 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-34-generic                 4.4.0-34.53                                                 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-36-generic                 4.4.0-36.55                                                 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-4.4.0-38-generic                 4.4.0-38.57                                                 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
rH  linux-image-4.4.0-42-generic                 4.4.0-42.62                                                 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
iF  linux-image-4.4.0-43-generic                 4.4.0-43.63                                                 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
iF  linux-image-4.4.0-45-generic                 4.4.0-45.66                                                 amd64        Linux kernel image for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-31-generic           4.4.0-31.50                                                 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-34-generic           4.4.0-34.53                                                 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-36-generic           4.4.0-36.55                                                 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
ii  linux-image-extra-4.4.0-38-generic           4.4.0-38.57                                                 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
rH  linux-image-extra-4.4.0-42-generic           4.4.0-42.62                                                 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
iU  linux-image-extra-4.4.0-43-generic           4.4.0-43.63                                                 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit x86 SMP
iU  linux-image-extra-4.4.0-45-generic           4.4.0-45.66                                                 amd64        Linux kernel extra modules for version 4.4.0 on 64 bit     

Synaptic 表示现在有 1 个损坏的软件包,但是当我尝试删除/更新时

E:linux-image-extra-4.4.0-42-generic:子进程安装后删除脚本返回错误退出状态 1 E:linux-image-4.4.0-42-generic:子进程安装后删除脚本返回错误退出状态 1

相关内容