I am using Ubuntu 20.04 LTS and I am unable to install packages from apt
or apt-get
. Whenever I try to install a package, the process terminates with the following error
E: The package linux-headers-5.4.0-56 needs to be reinstalled, but I can't find an archive for it.
I tried to install it manually for my kernel but it keeps throwing the same error again
$ sudo apt install linux-header-$(uname -r)
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: The package linux-headers-5.4.0-56 needs to be reinstalled, but I can't find an archive for it.
To try out from a different kernel, I have booted to an older kernel version (5.4.0-54) from grub but had no luck.
This error prevents me from installing a new package and also from upgrading the existing packages. Any assistance on this would be appreciated.