Dear I got this error when I run this command . sudo dpkg --configure -a
Error: dpkg: dependency problems prevent configuration of linux-generic-hwe-18.04:
linux-generic-hwe-18.04 depends on linux-headers-generic-hwe-18.04 (= 5.4.0.38.42~18.04.29); however:
Version of linux-headers-generic-hwe-18.04 on system is 5.3.0.59.113.
dpkg: error processing package linux-generic-hwe-18.04 (–configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-generic-hwe-18.04
How can I resolve this error.
When I run this command >> sudo apt dist-upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: The package linux-hwe-5.4-headers-5.4.0-38 needs to be reinstalled, but I can’t find an archive for it.
it sounds like there was some kind of trouble previously that lead you to run sudo dpkg --configure -a. can you run sudo apt update and sudo apt upgrade and post the output so we can get a fuller picture of what’s going on?
edit: it would also be helpful if you could provide a brief description of what you were trying to do (maybe upgrade to 20.04?) when the problems started.
When I run $ sudo apt update.
Hit:1 http://mirrors.isu.net.sa/pub/ubuntu-releases bionic InRelease
{I delete 6 links here because I unable to upload more than two links. }
Hit:9 https://packages.microsoft.com/repos/ms-teams stable InRelease
Fetched 494 kB in 1s (356 kB/s)
Reading package lists… Done
Building dependency tree
Reading state information… Done
143 packages can be upgraded. Run ‘apt list --upgradable’ to see them.
…
when I run $ sudo apt upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: The package linux-hwe-5.4-headers-5.4.0-38 needs to be reinstalled, but I can’t find an archive for it.
…
3. When I run this command $ sudo apt dist-upgrade
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: The package linux-hwe-5.4-headers-5.4.0-38 needs to be reinstalled, but I can’t find an archive for it.
…
when I run this command . $ sudo dpkg --configure -a
Error: dpkg: dependency problems prevent configuration of linux-generic-hwe-18.04:
linux-generic-hwe-18.04 depends on linux-headers-generic-hwe-18.04 (= 5.4.0.38.42~18.04.29); however:
Version of linux-headers-generic-hwe-18.04 on system is 5.3.0.59.113.
dpkg: error processing package linux-generic-hwe-18.04 (–configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-generic-hwe-18.04
…
Command ‘inxi’ not found, but can be installed with:
sudo apt install inxi
sudo apt install inxi
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: The package linux-hwe-5.4-headers-5.4.0-38 needs to be reinstalled, but I can’t find an archive for it.
I try these >
maidul@maidul-Inspiron-5567:~$ uname -a
Linux maidul-Inspiron-5567 5.4.0-38-generic #42~18.04.1-Ubuntu SMP Mon Jun 15 09:48:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
maidul@maidul-Inspiron-5567:~$ uname -r
5.4.0-38-generic
thank you for that output. uname -a was going to be my next request and you beat me to it. i wasn’t thinking of listing what was in /boot, but that was very helpful
i think i am as confused as your computer about how it was able to install and use the 5.4.0-38-generic kernel, but failed to get the headers at the same time.
i would start with sudo apt update --fix-missing
to see if that will bring in the missing headers. i would then try sudo apt install -f
if the --fix-missing option doesn’t work.
sudo apt update --fix-missing
[sudo] password for maidul:
Hit:10 http://apt.postgresql.org/pub/repos/apt bionic-pgdg InRelease
Get:22 http://archive.ubuntu.com/ubuntu bionic-proposed/universe amd64 DEP-11 Metadata [1,288 B]
Fetched 5,061 kB in 3s (1,968 kB/s)
Reading package lists… Done
Building dependency tree
Reading state information… Done
143 packages can be upgraded. Run ‘apt list --upgradable’ to see them.
maidul@maidul-Inspiron-5567:~$ sudo apt install -f
Reading package lists… Done
Building dependency tree
Reading state information… Done
E: The package linux-hwe-5.4-headers-5.4.0-38 needs to be reinstalled, but I can’t find an archive for it.
i gather that you are running ubuntu 18.04. can you confirm that please? in addition, are you running regular ubuntu with the gnome desktop environment?
do you see the grub screen when you boot so that you can choose to run a memtest or boot into a different kernel?
yes I am using 18.04. desktop version.
yes i seen there is four options comming when booting . like ubuntu, ubuntu memtest , 3rd and 4th options
let me know what can I do?
my distro is based on ubuntu 18.04 and i can’t even find 5.4.0-38 listed in the repositories did you possibly install it with something like ukuu?
my next thought would be to try booting into a different kernel. one of those options at the grub menu other than the first and memtest is to boot into is something like “recovery mode”. when you highlight it and press enter you usually get a choice of which kernel you want to try. just make sure it is something other than the 5.4.0-38 that you are currently using and has the missing headers.
if you are able to successfully boot (i can’t see why you wouldn’t be from what you listed in /boot [thank you again for thinking of that]), i would try updating to see if that removes both the kernel and problematic missing headers archive.
Here is the error: E: The package linux-hwe-5.4-headers-5.4.0-38 needs to be reinstalled, but I can’t find an archive for it.
Same error . Please let me know.
You need to use the current version of the kernel, that has corresponding headers currently in the repositories. Then you need to reinstall these corresponding kernel headers, as the message is telling you.
however that kernel was installed, neither it nor the headers exist in the present repositories that i could find in either an online search or with synaptic package manager in both my ubuntu 18.04-based distro (bodhi 5.1) or an 18.04 vm. for whatever reason the -37 and -39 kernels still exist, but there is no trace of -38.
of course since you (@droidmaid) have a mostly functional system, having a backup in place before making system changes is very much recommended.
what looks like the easier way to remove that is to try the command sudo apt-get autoremove --purge. after that you could run sudo apt upgrade or ls /boot again to see if the purge command was successful. if it did work, you would want to make sure and update your grub configuration with sudo update-grub.
if it was not successful, the page linked below describes how to use (among other options) a program called synaptic package manager (also available in the software center if a graphical installation is easier or preferred) to remove the old kernel. of couse after doing so you would want to update grub as well.