when I ever I want to make most of the things in terminal I faced this problem ,even when I try to run sudo apt upgrade , it also appear I try to reinstall it by using sudo apt install --reinstall linux-headers-5.4.0-56 linux-headers-5.4.0-56-generic and it appear also
Asked
Active
Viewed 1,121 times
1 Answers
1
This package was removed from the repositories a few weeks ago. You can resolve the issue by doing this:
Open Terminal (if it's not already open)
Run this command:
sudo apt remove linux-modules-5.4.0-56-generic
From here you can clean apt a little bit with:
$ sudo apt autoremove && sudo apt clean
$ sudo apt update
This should resolve the problem
-
when running :sudo apt remove linux-modules-5.4.0-56-generic 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 an archive for it can't be found. – SH EB Feb 02 '21 at 08:44
-
1then try to remove it with dpkg. `sudo dpkg -P linux-modules-5.4.0-56-generic` – nobody Feb 02 '21 at 08:57
-
If that doesn't work, [this is an excellent walk-through of how to remove packages when things go sour](https://askubuntu.com/a/968759/1091774). Scroll down to the "How to manage broken packages" section and start from the first step. Hopefully you don't need to get all the way through to number five. – Feb 02 '21 at 09:01