1

Despite seeing multiple threads here about the same problem, i couldn't follow them.

I can't install any packages, whenever i try to install something with apt install there's the same error:

(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)

when i try 'sudo apt --fix-broken install' it says the same thing.

When i enter 'dpkg --list | grep linux-image' it shows:

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

Output of 'uname -r':

5.19.0-32-generic

'sudo dpkg --purge --force-remove-reinstreq linux-image-5.19.0-40-generic' and its variants show the same error, i tried those.

I also have a lot of unmet dependencies, but i can't solve them because everything leads to the same error! What can i do to erase the image?

1 Answers1

1

stop create symlink to vmlinuz by Editing the file /etc/kernel-img.conf if the file not exist create it. set the following options to the file:

do_symlinks = no
no_symlinks = yes

related

  1. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1318951
  2. Issue with installing the latest linux image in lubuntu 20.04
Talaat Etman
  • 1,340