package linux-image-generic-hwe-20.04 5.11.0.37.41~20.04.16 failed to install/upgrade: package is in a very bad inconsistent state; you should reinstall it before attempting configuration

Bug #1946353 reported by Matt Phillips
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-meta-hwe-5.11 (Ubuntu)
New
Undecided
Unassigned

Bug Description

Trying to install a package using Ubuntu Software catalogue, and the installation was interrupted by a message saying that "E: dpkg was interrupted, you must manually run 'dpkg --configure -a' to correct the problem." I tried to run this command in Terminal, but it wouldn't work, so I searched online for a solution and found that some people had a similar message appear (the same as above but with 'sudo' appearing before 'dpkg' at the start of the command line - see https://askubuntu.com/questions/163200/e-dpkg-was-interrupted-run-sudo-dpkg-configure-a). I tried this, and some error messages came up.

Full details shown on Terminal after trying command 'sudo dpkg --configure -a':
dpkg: dependency problems prevent configuration of linux-generic-hwe-20.04:
 linux-generic-hwe-20.04 depends on linux-headers-generic-hwe-20.04 (= 5.11.0.37.41~20.04.16); however:
  Version of linux-headers-generic-hwe-20.04 on system is 5.11.0.36.40~20.04.15.

dpkg: error processing package linux-generic-hwe-20.04 (--configure):
 dependency problems - leaving unconfigured
Setting up linux-image-5.11.0-37-generic (5.11.0-37.41~20.04.2) ...
I: /boot/vmlinuz.old is now a symlink to vmlinuz-5.11.0-36-generic
I: /boot/initrd.img.old is now a symlink to initrd.img-5.11.0-36-generic
I: /boot/vmlinuz is now a symlink to vmlinuz-5.11.0-37-generic
I: /boot/initrd.img is now a symlink to initrd.img-5.11.0-37-generic
Setting up linux-modules-extra-5.11.0-37-generic (5.11.0-37.41~20.04.2) ...
dpkg: error processing package linux-image-generic-hwe-20.04 (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Setting up linux-modules-5.11.0-37-generic (5.11.0-37.41~20.04.2) ...
Processing triggers for linux-image-5.11.0-37-generic (5.11.0-37.41~20.04.2) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.11.0-37-generic
Error! Your kernel headers for kernel 5.11.0-37-generic cannot be found.
Please install the linux-headers-5.11.0-37-generic package,
or use the --kernelsourcedir option to tell DKMS where it's located
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.11.0-37-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.11.0-37-generic
Found initrd image: /boot/initrd.img-5.11.0-37-generic
Found linux image: /boot/vmlinuz-5.11.0-36-generic
Found initrd image: /boot/initrd.img-5.11.0-36-generic
Found linux image: /boot/vmlinuz-5.11.0-34-generic
Found initrd image: /boot/initrd.img-5.11.0-34-generic
Adding boot menu entry for UEFI Firmware Settings
done
Errors were encountered while processing:
 linux-generic-hwe-20.04
 linux-image-generic-hwe-20.04

Due to the error messages that are shown above, I followed some other instructions given on the forum page (linked above), i.e. I used the command 'sudo apt-get install -f'. This came up with the following:

Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following packages were automatically installed and are no longer required:
  libfprint-2-tod1 libllvm10 linux-headers-5.11.0-34-generic
  linux-hwe-5.11-headers-5.11.0-34 linux-image-5.11.0-34-generic
  linux-modules-5.11.0-34-generic linux-modules-extra-5.11.0-34-generic
Use 'sudo apt autoremove' to remove them.
The following additional packages will be installed:
  linux-headers-5.11.0-37-generic linux-headers-generic-hwe-20.04
  linux-hwe-5.11-headers-5.11.0-37
The following NEW packages will be installed
  linux-headers-5.11.0-37-generic linux-hwe-5.11-headers-5.11.0-37
The following packages will be upgraded:
  linux-headers-generic-hwe-20.04
1 to upgrade, 2 to newly install, 0 to remove and 81 not to upgrade.
2 not fully installed or removed.
Need to get 0 B/13.2 MB of archives.
After this operation, 90.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Selecting previously unselected package linux-hwe-5.11-headers-5.11.0-37.
(Reading database ... 209271 files and directories currently installed.)
Preparing to unpack .../linux-hwe-5.11-headers-5.11.0-37_5.11.0-37.41~20.04.2_all.deb ...
Unpacking linux-hwe-5.11-headers-5.11.0-37 (5.11.0-37.41~20.04.2) ...
Selecting previously unselected package linux-headers-5.11.0-37-generic.
Preparing to unpack .../linux-headers-5.11.0-37-generic_5.11.0-37.41~20.04.2_amd64.deb ...
Unpacking linux-headers-5.11.0-37-generic (5.11.0-37.41~20.04.2) ...
Preparing to unpack .../linux-headers-generic-hwe-20.04_5.11.0.37.41~20.04.16_amd64.deb ...
Unpacking linux-headers-generic-hwe-20.04 (5.11.0.37.41~20.04.16) over (5.11.0.36.40~20.04.15) ...
Setting up linux-hwe-5.11-headers-5.11.0-37 (5.11.0-37.41~20.04.2) ...
Setting up linux-headers-5.11.0-37-generic (5.11.0-37.41~20.04.2) ...
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.11.0-37-generic

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
make -j2 KERNELRELEASE=5.11.0-37-generic -C /lib/modules/5.11.0-37-generic/build M=/var/lib/dkms/virtualbox/6.1.26/build....................
Signing module:
 - /var/lib/dkms/virtualbox/6.1.26/5.11.0-37-generic/x86_64/module/vboxnetflt.ko
 - /var/lib/dkms/virtualbox/6.1.26/5.11.0-37-generic/x86_64/module/vboxnetadp.ko
 - /var/lib/dkms/virtualbox/6.1.26/5.11.0-37-generic/x86_64/module/vboxdrv.ko
Secure Boot not enabled on this system.
cleaning build area...

DKMS: build completed.

vboxdrv.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.11.0-37-generic/updates/dkms/

vboxnetadp.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.11.0-37-generic/updates/dkms/

vboxnetflt.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/5.11.0-37-generic/updates/dkms/

depmod.....

DKMS: install completed.
   ...done.
dpkg: error processing package linux-image-generic-hwe-20.04 (--configure):
 package is in a very bad inconsistent state; you should
 reinstall it before attempting configuration
Setting up linux-headers-generic-hwe-20.04 (5.11.0.37.41~20.04.16) ...
dpkg: dependency problems prevent configuration of linux-generic-hwe-20.04:
 linux-generic-hwe-20.04 depends on linux-image-generic-hwe-20.04 (= 5.11.0.37.41~20.04.16); however:
  Package linux-image-generic-hwe-20.04 is not configured yet.

dpkg: error processing package linux-generic-hwe-20.04 (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates it's a follow-up error from a previous failure.
                            Errors were encountered while processing:
 linux-image-generic-hwe-20.04
 linux-generic-hwe-20.04
E: Sub-process /usr/bin/dpkg returned an error code (1)

I was asked to submit a bug report, hence this message.

ProblemType: Package
DistroRelease: Ubuntu 20.04
Package: linux-image-generic-hwe-20.04 5.11.0.37.41~20.04.16
ProcVersionSignature: Ubuntu 5.11.0-36.40~20.04.1-generic 5.11.22
Uname: Linux 5.11.0-36-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.20
AptOrdering:
 linux-hwe-5.11-headers-5.11.0-37:amd64: Install
 linux-headers-5.11.0-37-generic:amd64: Install
 linux-headers-generic-hwe-20.04:amd64: Install
 NULL: ConfigurePending
Architecture: amd64
CasperMD5CheckResult: skip
Date: Thu Oct 7 12:00:57 2021
ErrorMessage: package is in a very bad inconsistent state; you should reinstall it before attempting configuration
InstallationDate: Installed on 2021-08-07 (60 days ago)
InstallationMedia: Ubuntu 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
Python3Details: /usr/bin/python3.8, Python 3.8.10, python3-minimal, 3.8.2-0ubuntu2
PythonDetails: N/A
RelatedPackageVersions:
 dpkg 1.19.7ubuntu3
 apt 2.0.6
SourcePackage: linux-meta-hwe-5.11
Title: package linux-image-generic-hwe-20.04 5.11.0.37.41~20.04.16 failed to install/upgrade: package is in a very bad inconsistent state; you should reinstall it before attempting configuration
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Matt Phillips (philm004) wrote :
tags: removed: need-duplicate-check
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.