错误!无法找到内核 3.13.0-69-generic 的内核头文件 - 无法更新!

错误!无法找到内核 3.13.0-69-generic 的内核头文件 - 无法更新!

尝试升级时,出现此错误:

可用磁盘空间不足

升级已中止。升级需要磁盘“/boot”上总共 81.8 M 的可用空间。请在“/boot”上至少释放 81.8 M 的额外磁盘空间。使用“sudo apt-get clean”清空垃圾并删除以前安装的临时软件包。

然后,当我按照说明释放空间时,我得到了以下信息:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  linux-image-3.13.0-53-generic* linux-image-3.13.0-63-generic*
  linux-image-3.13.0-64-generic* linux-image-3.13.0-65-generic*
  linux-image-extra-3.13.0-53-generic* linux-image-extra-3.13.0-63-generic*
  linux-image-extra-3.13.0-64-generic* linux-image-extra-3.13.0-65-generic*
  linux-image-extra-3.13.0-69-generic
0 upgraded, 0 newly installed, 9 to remove and 2 not upgraded.
8 not fully installed or removed.
After this operation, 929 MB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 180855 files and directories currently installed.)
Removing linux-image-extra-3.13.0-69-generic (3.13.0-69.112) ...
depmod: FATAL: could not load /boot/System.map-3.13.0-69-generic: No such file or directory
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.13.0-69-generic /boot/vmlinuz-3.13.0-69-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.13.0-69-generic /boot/vmlinuz-3.13.0-69-generic
Error! Your kernel headers for kernel 3.13.0-69-generic cannot be found.
Please install the linux-headers-3.13.0-69-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.13.0-69-generic /boot/vmlinuz-3.13.0-69-generic
update-initramfs: Generating /boot/initrd.img-3.13.0-69-generic
grep: /boot/config-3.13.0-69-generic: No such file or directory
WARNING: missing /lib/modules/3.13.0-69-generic
Device driver support needs thus be built-in linux image!
depmod: ERROR: could not open directory /lib/modules/3.13.0-69-generic: No such file or directory
depmod: FATAL: could not search modules: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_1pM5O4/lib/modules/3.13.0-69-generic/modules.order: No such file or directory
depmod: WARNING: could not open /tmp/mkinitramfs_1pM5O4/lib/modules/3.13.0-69-generic/modules.builtin: No such file or directory

gzip: stdout: No space left on device
E: mkinitramfs failure cpio 141 gzip 1
update-initramfs: failed for /boot/initrd.img-3.13.0-69-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-3.13.0-69-generic (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-extra-3.13.0-69-generic

我已按照许多关于如何解决此问题的建议进行操作,但它总是返回有关“没有此目录”的相同错误

任何帮助都将不胜感激!

答案1

也许您可以先尝试清除旧的不需要的包并释放一些空间:

sudo apt-get autoremove

..然后使用以下方法再次尝试安装标题:

sudo apt-get install linux-headers-$(uname -r)

答案2

尝试sudo apt-get install linux-headers-$(uname -r)

从:错误!无法找到内核 3.5.0-25-generic 的内核头文件

相关内容