Lubuntu 22.04。无法删除 linux-image-5.19.0-40-generic

Lubuntu 22.04。无法删除 linux-image-5.19.0-40-generic

尽管看到这里有关于同一问题的多个帖子,但我无法关注它们。

我无法安装任何软件包,每当我尝试使用 apt install 安装某些东西时都会出现同样的错误:

(Reading database ... 317623 files and directories currently installed.)
Removing linux-image-5.19.0-40-generic (5.19.0-40.41~22.04.1) ...
Failed to create symlink to vmlinuz-5.19.0-32-generic: Operation not permitted at /usr/bin/linux-update-symlinks line 64.
dpkg: error processing package linux-image-5.19.0-40-generic (--remove):
 installed linux-image-5.19.0-40-generic package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-5.19.0-40-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

当我尝试“sudo apt --fix-broken install”时,它显示同样的内容。

当我输入“dpkg --list | grep linux-image”时,它显示:

ii  linux-image-5.19.0-32-generic                 5.19.0-32.33~22.04.1                    amd64        Signed kernel image generic
rH  linux-image-5.19.0-40-generic                 5.19.0-40.41~22.04.1                    amd64        Signed kernel image generic

‘uname -r’的输出:

5.19.0-32-generic

'sudo dpkg --purge --force-remove-reinstreq linux-image-5.19.0-40-generic' 及其变体显示相同的错误,我试过了。

我也有很多未满足的依赖项,但我无法解决它们,因为一切都会导致相同的错误!我该怎么做才能删除图像?

答案1

如果文件不存在,则通过编辑文件停止创建到 vmlinuz 的符号链接,并/etc/kernel-img.conf创建该文件。为文件设置以下选项:

do_symlinks = no
no_symlinks = yes

有关的

  1. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1318951
  2. 在 lubuntu 20.04 中安装最新的 Linux 映像时出现问题

相关内容