Every time I try to install a package like using the command below
sudo apt install git
I get the output
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: The package linux-headers-5.15.0-58 needs to be reinstalled, but I can't find an archive for it.
I am currently on Ubuntu 22.04.1 LTS. I've been trying to fix it with commands from this post: Ubuntu won't update: "The package linux-modules-5.19.0-32-generic needs to be reinstalled", but I can't find an archive for it. Obviously, the issue in that thread is from a different version.I have also tried other commands from this thread: Linux-Headers Reinstall
Any ideas on how to fix this error?
sudo apt update
& check all lines of output are there, no warnings/errors & no missing lines etc.. ie. check your sources after you work out what OS/release you're using (we're limited to details you tell us) – guiverc Sep 02 '23 at 13:14