删除 5.8.0-34-generic 内核时出错

删除 5.8.0-34-generic 内核时出错

我的 wifi 适配器突然停止工作,经过一番研究后,我发现这是由于最近的内核更新造成的。

我试图跟随解决方案来修复该问题,但在步骤 1 之后:

清除与内核 5.8.0-34-generic 相关的所有软件包: sudo apt purge linux-image-5.8.0-34-generic linux-image-unsigned-5.8.0-34-generic linux-modules-5.8.0-34-generic linux-headers-5.8.0-34-generic

我收到以下错误:

(Reading database ... 266336 files and directories currently installed.)
Removing linux-image-5.8.0-34-generic (5.8.0-34.37~20.04.2) ...
E: Aborting removal of the running kernel
dpkg: error processing package linux-image-5.8.0-34-generic (--remove):
 installed linux-image-5.8.0-34-generic package pre-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-5.8.0-34-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

我怎样才能解决这个问题?

答案1

E: Aborting removal of the running kernel

您正在尝试删除当前正在运行的内核。请启动其他内核(如果启动时没有显示 GRUB 菜单,请按 Shift 或箭头键)并删除所需的内核。您可以使用以下命令检查正在运行的内核uname -r

相关内容