2

I encounter the following error after running sudo apt upgrade in Ubuntu 22.04:

dpkg: error processing package linux-hwe-6.5-headers-6.5.0-26 (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
dpkg: dependency problems prevent configuration of linux-headers-6.5.0-26-generi
c:
 linux-headers-6.5.0-26-generic depends on linux-hwe-6.5-headers-6.5.0-26; howev
er:
  Package linux-hwe-6.5-headers-6.5.0-26 is not configured yet.

dpkg: error processing package linux-headers-6.5.0-26-generic (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup erro r from a previous failure. No apport report written because the error message ind icates its a followup error from a previous failure. dpkg: dependency problems pr event configuration of linux-headers-generic-hwe-22.04: linux-headers-generic-hwe-22.04 depends on linux-headers-6.5.0-26-generic; howe ver: Package linux-headers-6.5.0-26-generic is not configured yet.

dpkg: error processing package linux-headers-generic-hwe-22.04 (--configure): dependency problems - leaving unconfigured Errors were encountered while processing: linux-hwe-6.5-headers-6.5.0-26 linux-headers-6.5.0-26-generic linux-headers-generic-hwe-22.04 E: Sub-process /usr/bin/dpkg returned an error code (1)

Ajay
  • 1,246

1 Answers1

1

The key phrase in the error message is package is in a very bad inconsistent state; you should reinstall it before attempting configuration

Reinstall the problematic package using sudo apt install --reinstall <package-name>

So, in your case, that would be sudo apt install --reinstall linux-hwe-6.5-headers-6.5.0-26

user535733
  • 62,253