dpkg: dependency problems prevent configuration of linux-headers-generic
I ran out of inodes during an update which I think resulted in unmet dependencies. The system recommended I issue ‘apt-get -f install’ to fix. However I could not issue the command because of lack of inodes. It turned out that there were many older versions of linux-headers and linux-image. I manually deleted:
$ sudo rm -rf /usr/src/linux-headers-3.2.0-65*
$ sudo apt-get -f install 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: linux-headers-3.2.0-118-generic linux-headers-3.2.0-83-generic linux-image-3.2.0-94-generic linux-image-3.2.0-89-generic linux-headers-3.2.0-99-generic linux-image-3.2.0-121-generic linux-image-3.2.0-116-generic unattended-upgrades linux-headers-3.2.0-110-generic linux-headers-3.2.0-70-generic linux-headers-3.2.0-65-generic linux-headers-3.2.0-91-generic linux-headers-3.2.0-86-generic linux-image-3.2.0-97-generic python-pycurl linux-image-3.2.0-119-generic linux-headers-3.2.0-113-generic linux-headers-3.2.0-70 linux-headers-3.2.0-65 linux-headers-3.2.0-72 linux-headers-3.2.0-68 linux-headers-3.2.0-74 linux-headers-3.2.0-69 linux-headers-3.2.0-80 linux-headers-3.2.0-75 linux-headers-3.2.0-76 linux-headers-3.2.0-82 linux-headers-3.2.0-77 linux-headers-3.2.0-83 linux-headers-3.2.0-84 linux-headers-3.2.0-79 linux-headers-3.2.0-90 linux-headers-3.2.0-85 linux-headers-3.2.0-91 linux-headers-3.2.0-86 linux-headers-3.2.0-92 linux-headers-3.2.0-87 linux-headers-3.2.0-93 linux-headers-3.2.0-88 linux-headers-3.2.0-94 linux-headers-3.2.0-89 linux-headers-3.2.0-95 linux-headers-3.2.0-96 linux-headers-3.2.0-97 linux-headers-3.2.0-98 linux-headers-3.2.0-99 linux-headers-3.2.0-68-generic linux-image-3.2.0-84-generic python-cheetah linux-headers-3.2.0-94-generic linux-headers-3.2.0-89-generic linux-image-3.2.0-111-generic linux-image-3.2.0-106-generic python-software-properties linux-headers-3.2.0-121-generic linux-headers-3.2.0-116-generic python-oauth linux-headers-3.2.0-76-generic linux-image-3.2.0-92-generic linux-image-3.2.0-87-generic linux-headers-3.2.0-97-generic linux-image-3.2.0-109-generic linux-headers-3.2.0-119-generic linux-headers-3.2.0-84-generic linux-headers-3.2.0-79-generic linux-image-3.2.0-101-generic linux-image-3.2.0-95-generic python-paramiko linux-headers-3.2.0-111-generic linux-headers-3.2.0-106-generic linux-headers-3.2.0-92-generic linux-headers-3.2.0-87-generic linux-image-3.2.0-104-generic linux-image-3.2.0-98-generic linux-headers-3.2.0-109-generic linux-headers-3.2.0-74-generic linux-headers-3.2.0-69-generic linux-image-3.2.0-90-generic linux-image-3.2.0-85-generic linux-headers-3.2.0-95-generic linux-image-3.2.0-107-generic linux-headers-3.2.0-101-generic python-boto linux-headers-3.2.0-82-generic linux-headers-3.2.0-77-generic python-configobj linux-image-3.2.0-93-generic linux-image-3.2.0-88-generic linux-headers-3.2.0-98-generic linux-image-3.2.0-120-generic linux-image-3.2.0-115-generic linux-headers-3.2.0-104-generic linux-headers-3.2.0-90-generic linux-headers-3.2.0-85-generic linux-image-3.2.0-102-generic python-m2crypto linux-image-3.2.0-96-generic linux-image-3.2.0-118-generic linux-headers-3.2.0-107-generic linux-headers-3.2.0-72-generic euca2ools linux-image-3.2.0-83-generic linux-headers-3.2.0-93-generic linux-headers-3.2.0-88-generic linux-image-3.2.0-110-generic linux-image-3.2.0-99-generic linux-headers-3.2.0-101 linux-headers-3.2.0-102 linux-headers-3.2.0-104 linux-headers-3.2.0-110 linux-headers-3.2.0-111 linux-headers-3.2.0-106 linux-headers-3.2.0-107 linux-headers-3.2.0-113 linux-headers-3.2.0-109 linux-headers-3.2.0-120 linux-headers-3.2.0-115 linux-headers-3.2.0-121 linux-headers-3.2.0-116 linux-headers-3.2.0-118 linux-headers-3.2.0-119 linux-headers-3.2.0-120-generic linux-headers-3.2.0-115-generic linux-headers-3.2.0-80-generic linux-headers-3.2.0-75-generic python-crypto linux-image-3.2.0-91-generic linux-image-3.2.0-86-generic linux-headers-3.2.0-96-generic linux-image-3.2.0-113-generic linux-headers-3.2.0-102-generic Use 'apt-get autoremove' to remove them. The following extra packages will be installed: linux-generic linux-headers-generic The following packages will be upgraded: linux-generic linux-headers-generic 2 upgraded, 0 newly installed, 0 to remove and 26 not upgraded. 2 not fully installed or removed. Need to get 4,282 B of archives. After this operation, 0 B of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://mirror.rackspace.com/ubuntu/ precise-updates/main linux-generic amd64 3.2.0.124.139 [1,718 B] Get:2 http://mirror.rackspace.com/ubuntu/ precise-updates/main linux-headers-generic amd64 3.2.0.124.139 [2,564 B] Fetched 4,282 B in 0s (180 kB/s) dpkg: dependency problems prevent configuration of linux-headers-generic: linux-headers-generic depends on linux-headers-3.2.0-123-generic; however: Package linux-headers-3.2.0-123-generic is not installed. dpkg: error processing linux-headers-generic (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. dpkg: dependency problems prevent configuration of linux-generic: linux-generic depends on linux-image-generic (= 3.2.0.123.138); however: Version of linux-image-generic on system is 3.2.0.124.139. linux-generic depends on linux-headers-generic (= 3.2.0.123.138); however: Package linux-headers-generic is not configured yet. dpkg: error processing linux-generic (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure. Errors were encountered while processing: linux-headers-generic linux-generic E: Sub-process /usr/bin/dpkg returned an error code (1)
My guess is that 3.2.0.123 somehow got corrupted while I was making space in disk and needs to get re-installed. However I’m no expert and don’t want to make the problem worse. Can someone help me sort this out? Thanks in advance, Jose Ambros-Ingerson
Upgrade to 23.04 from 22.10 failed with error for linux-headers-6.2.0-20-generic. How do I fix?
I have 22.10 running on a Dell laptop, received a popup to upgrade to 23.04. During the installation I got an error message stating that the installation of linux-headers-6.2.0-20-generic has failed due to an error. At the end it said that the system will be left in an unstable state. I have not restarted the laptop, but I believe it wont restart if I tried! :/ Here is the output of sudo dpkg —configure -a :
Setting up linux-image-6.2.0-20-generic (6.2.0-20.20) . Setting up linux-headers-6.2.0-20-generic (6.2.0-20.20) . /etc/kernel/header_postinst.d/dkms: * dkms: running auto installation service for kernel 6.2.0-20-generic Sign command: /usr/bin/kmodsign Signing key: /var/lib/shim-signed/mok/MOK.priv Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der Building module: Cleaning build area. make -j4 KERNELRELEASE=6.2.0-20-generic all INCLUDEDIR=/lib/modules/6.2.0-20-generic/build/include KVERSION=6.2.0-20-generic DKMS_BUILD=1. (bad exit status: 2) ERROR (dkms apport): binary package for evdi: 1.12.0 not found Error! Bad return status for module build on kernel: 6.2.0-20-generic (x86_64) Consult /var/lib/dkms/evdi/1.12.0/build/make.log for more information. Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. . fail! run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 11 dpkg: error processing package linux-headers-6.2.0-20-generic (--configure): installed linux-headers-6.2.0-20-generic package post-installation script subprocess returned error exit status 1 dpkg: dependency problems prevent configuration of linux-headers-generic: linux-headers-generic depends on linux-headers-6.2.0-20-generic; however: Package linux-headers-6.2.0-20-generic is not configured yet. dpkg: error processing package linux-headers-generic (--configure): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of linux-generic: linux-generic depends on linux-headers-generic (= 6.2.0.20.20); however: Package linux-headers-generic is not configured yet. dpkg: error processing package linux-generic (--configure): dependency problems - leaving unconfigured Processing triggers for linux-image-6.2.0-20-generic (6.2.0-20.20) . /etc/kernel/postinst.d/dkms: * dkms: running auto installation service for kernel 6.2.0-20-generic Sign command: /usr/bin/kmodsign Signing key: /var/lib/shim-signed/mok/MOK.priv Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der Building module: Cleaning build area. make -j4 KERNELRELEASE=6.2.0-20-generic all INCLUDEDIR=/lib/modules/6.2.0-20-generic/build/include KVERSION=6.2.0-20-generic DKMS_BUILD=1. (bad exit status: 2) ERROR (dkms apport): binary package for evdi: 1.12.0 not found Error! Bad return status for module build on kernel: 6.2.0-20-generic (x86_64) Consult /var/lib/dkms/evdi/1.12.0/build/make.log for more information. Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. . fail! run-parts: /etc/kernel/postinst.d/dkms exited with return code 11 dpkg: error processing package linux-image-6.2.0-20-generic (--configure): installed linux-image-6.2.0-20-generic package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: linux-headers-6.2.0-20-generic linux-headers-generic linux-generic linux-image-6.2.0-20-generic
error when running sudo apt-get upgrade (linux-headers-generic related)
to try to fix this, i manually downloaded the following packages from the ubuntu kernel team site and installed succesfully: linux-headers-5.6.10-050610_5.6.10-050610.202005052301_all.deb
linux-image-unsigned-5.6.10-050610-generic_5.6.10-050610.202005052301_amd64.deb
linux-modules-5.6.10-050610-generic_5.6.10-050610.202005052301_amd64.deb so when i run $ uname r it says:
~$ uname -r 5.6.10-050610-generic
i thought it would solve the problem, but i still get that same message from before installing. don’t i have the updated version of the headers they need? why is that a problem? what even is the problem?
While it’s really great that you decided to become a kernel tester, you seem to imply that may not have been your intent. Ubuntu 20.10 (and future 20.04.2) will use kernel 5.8, so your migration to 5.6 seems a bit of a dead-end.
2 Answers 2
As of today, the current package for both linux-generic and linux-headers-generic is 5.4.0.52.55 (not 5.4.0.51.54)
- You forgot to run sudo apt update . This is the most common reason. Simply do so, and your problem will magically vanish like a morning fog.
- If you recently did a release-upgrade, and you have other problems, then you might have had problems with your release-upgrade. It’s common when folks add non-Ubuntu packages, third-party sources, PPAs, and other strange stuff, and then hope that apt can handle it magically. It cannot, which breaks upgrades. This is moderately common with LTS-to-LTS upgrades where folks don’t keep track of what they installed two years ago. If this is what happened to you, then the easy solution is to backup your data and clean-install 20.04 to wipe away all that historical dreck. Best practice for release-upgrades is to uninstall all non-Ubuntu and wrong-version packages and sources before a release-upgrade; return your system to as close to stock condition as possible. Then release-upgrade, then restore your non-Ubuntu sources and package. Next time, try to do it that way.
- On rare occasions, a metapackage (like linux-headers-generic ) fails to upgrade. This usually happens when folks or their network connection are inconsistent about upgrades and delay normal apt upgrades for more than a few weeks. It’s most often associated with no-space-left-on-device errors. You can test for this by looking at the metapackage version. In this example, the version number is current (5.4.0.52.55), so my system does NOT have this problem, and the solution below won’t help.
$ dpkg -l | grep linux-image-generic ii linux-image-generic 5.4.0.52.55
If your system has an older version number that stubbornly won’t change, then use clean to delete the metapackage from your local cache (thereby forcing apt to download a fresh copy) then reinstall the metapackage. Finally run a normal apt upgrade.
sudo apt update sudo apt clean linux-headers-generic sudo apt install --reinstall linux-headers-generic sudo apt upgrade
sudo apt update sudo apt upgrade