![由于 linux-image 错误,我无法再安装任何东西](https://linux22.com/image/996514/%E7%94%B1%E4%BA%8E%20linux-image%20%E9%94%99%E8%AF%AF%EF%BC%8C%E6%88%91%E6%97%A0%E6%B3%95%E5%86%8D%E5%AE%89%E8%A3%85%E4%BB%BB%E4%BD%95%E4%B8%9C%E8%A5%BF.png)
我正在尝试在 Ubuntu 16.04 上安装 spotify 客户端,但一直出现以下错误。我按照此处的说明进行操作:https://www.spotify.com/uk/download/linux/ 例如,当我尝试更新 mongodb 时也会发生同样的情况。有什么建议吗?
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
linux-headers-4.4.0-36 linux-headers-4.4.0-36-generic linux-image-4.4.0-36-generic linux-image-extra-4.4.0-36-generic ubuntu-core-launcher
Use 'sudo apt autoremove' to remove them.
Recommended packages:
libavcodec54 | libavcodec-extra-54 libavformat54
The following packages will be REMOVED:
linux-image-4.4.0-28-generic linux-image-4.4.0-31-generic linux-image-4.4.0-34-generic linux-image-extra-4.4.0-28-generic linux-image-extra-4.4.0-31-generic
linux-image-extra-4.4.0-34-generic
The following NEW packages will be installed:
spotify-client
0 upgraded, 1 newly installed, 6 to remove and 0 not upgraded.
15 not fully installed or removed.
Need to get 0 B/73,2 MB of archives.
After this operation, 486 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 300801 files and directories currently installed.)
Removing linux-image-extra-4.4.0-28-generic (4.4.0-28.47) ...
depmod: FATAL: could not load /boot/System.map-4.4.0-28-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
Error! Your kernel headers for kernel 4.4.0-28-generic cannot be found.
Please install the linux-headers-4.4.0-28-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-28-generic
WARNING: missing /lib/modules/4.4.0-28-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.4.0-28-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_VAlZ4z/lib/modules/4.4.0-28-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_VAlZ4z/lib/modules/4.4.0-28-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
/usr/sbin/grub-mkconfig: 6: /etc/default/grub: Windows 10 (loader) (on /dev/sda1): 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-28-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-4.4.0-28-generic (4.4.0-28.47) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-28-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-28-generic /boot/vmlinuz-4.4.0-28-generic
/usr/sbin/grub-mkconfig: 6: /etc/default/grub: Windows 10 (loader) (on /dev/sda1): 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-28-generic.postrm line 328.
dpkg: error processing package linux-image-4.4.0-28-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-extra-4.4.0-31-generic (4.4.0-31.50) ...
depmod: FATAL: could not load /boot/System.map-4.4.0-31-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-31-generic /boot/vmlinuz-4.4.0-31-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-31-generic /boot/vmlinuz-4.4.0-31-generic
Error! Your kernel headers for kernel 4.4.0-31-generic cannot be found.
Please install the linux-headers-4.4.0-31-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-31-generic /boot/vmlinuz-4.4.0-31-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-31-generic
WARNING: missing /lib/modules/4.4.0-31-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.4.0-31-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_abdXZQ/lib/modules/4.4.0-31-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_abdXZQ/lib/modules/4.4.0-31-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-31-generic /boot/vmlinuz-4.4.0-31-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-31-generic /boot/vmlinuz-4.4.0-31-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-31-generic /boot/vmlinuz-4.4.0-31-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-31-generic /boot/vmlinuz-4.4.0-31-generic
/usr/sbin/grub-mkconfig: 6: /etc/default/grub: Windows 10 (loader) (on /dev/sda1): 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-31-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-4.4.0-31-generic (4.4.0-31.50) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-31-generic /boot/vmlinuz-4.4.0-31-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-31-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-31-generic /boot/vmlinuz-4.4.0-31-generic
/usr/sbin/grub-mkconfig: 6: /etc/default/grub: Windows 10 (loader) (on /dev/sda1): 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-31-generic.postrm line 328.
dpkg: error processing package linux-image-4.4.0-31-generic (--remove):
subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
Removing linux-image-extra-4.4.0-34-generic (4.4.0-34.53) ...
depmod: FATAL: could not load /boot/System.map-4.4.0-34-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-generic
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-generic
Error! Your kernel headers for kernel 4.4.0-34-generic cannot be found.
Please install the linux-headers-4.4.0-34-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-34-generic
WARNING: missing /lib/modules/4.4.0-34-generic
Ensure all necessary drivers are built into the linux image!
depmod: ERROR: could not open directory /lib/modules/4.4.0-34-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_4FQUrq/lib/modules/4.4.0-34-generic/modules.order: No such file or directory
depmod: WARNING: could not open /var/tmp/mkinitramfs_4FQUrq/lib/modules/4.4.0-34-generic/modules.builtin: No such file or directory
run-parts: executing /etc/kernel/postinst.d/pm-utils 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-generic
/usr/sbin/grub-mkconfig: 6: /etc/default/grub: Windows 10 (loader) (on /dev/sda1): 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-34-generic (--remove):
subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
Removing linux-image-4.4.0-34-generic (4.4.0-34.53) ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-34-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-34-generic /boot/vmlinuz-4.4.0-34-generic
/usr/sbin/grub-mkconfig: 6: /etc/default/grub: Windows 10 (loader) (on /dev/sda1): 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-34-generic.postrm line 328.
dpkg: error processing package linux-image-4.4.0-34-generic (--remove):
subprocess installed post-removal script returned error exit status 1
No apport report written because MaxReports is reached already
Errors were encountered while processing:
linux-image-extra-4.4.0-28-generic
linux-image-4.4.0-28-generic
linux-image-extra-4.4.0-31-generic
linux-image-4.4.0-31-generic
linux-image-extra-4.4.0-34-generic
linux-image-4.4.0-34-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)