当我尝试执行sudo apt-get autoremove
或sudo apt-get dist-upgrade
(以及其他操作,但我认为这些目前具有代表性)时,我不断收到相同的错误:
Errors were encountered while processing:
linux-image-extra-3.13.0-93-generic
linux-image-3.13.0-93-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
完整执行:
bob@me:~$ sudo apt-get autoremove
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED
linux-image-3.13.0-93-generic linux-image-extra-3.13.0-93-generic
0 to upgrade, 0 to newly install, 2 to remove and 6 not to upgrade.
2 not fully installed or removed.
After this operation, 195 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 557136 files and directories currently installed.)
Removing linux-image-extra-3.13.0-93-generic (3.13.0-93.140) ...
depmod: FATAL: could not load /boot/System.map-3.13.0-93-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-93-generic /boot/vmlinuz-3.13.0-93-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.13.0-93-generic /boot/vmlinuz-3.13.0-93-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-93-generic /boot/vmlinuz-3.13.0-93-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-93-generic
grep: /boot/config-3.13.0-93-generic: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_s1fU0O/lib/modules/3.13.0-93-generic/modules.order: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_s1fU0O/lib/modules/3.13.0-93-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.13.0-93-generic /boot/vmlinuz-3.13.0-93-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.13.0-93-generic /boot/vmlinuz-3.13.0-93-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.13.0-93-generic /boot/vmlinuz-3.13.0-93-generic
grub-mkconfig: You must run this as root
run-parts: /etc/kernel/postinst.d/zz-update-grub exited with return code 1
dpkg: error processing package linux-image-extra-3.13.0-93-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-3.13.0-93-generic (3.13.0-93.140) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.13.0-93-generic /boot/vmlinuz-3.13.0-93-generic
update-initramfs: Deleting /boot/initrd.img-3.13.0-93-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.13.0-93-generic /boot/vmlinuz-3.13.0-93-generic
grub-mkconfig: You must run this as root
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-3.13.0-93-generic.postrm line 328.
dpkg: error processing package linux-image-3.13.0-93-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-extra-3.13.0-93-generic
linux-image-3.13.0-93-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
我不太明白这一点,因为我正在运行不同的内核:
bob@me:~$ uname -r
3.13.0-92-generic
任何想法都将受到欢迎。