package linux-headers-<version> <version> failed to install/upgrade: installed linux-headers-<version> package post-installation script subprocess returned error exit status
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Invalid
|
Medium
|
Unassigned |
Bug Description
This is an umbrella bug report for DKMS problems that result in a failure to install/upgrade a linux kernel headers package.
If you have DKMS modules installed, they are recompiled for every new kernel that is installed. Since you can have multiple kernels installed in parallel, a kernel upgrade is in fact an installation of a new kernel package.
The rebuild of the DKMS modules is triggered by the installation of a new kernel headers package. If you have unsupported DKMS modules installed, that rebuild might fail, resulting in a kernel headers package installation failure which will trigger the automatic bug reporting tool (apport).
The Ubuntu kernel team makes sure that all officially supported DKMS modules (the ones you can install from the Ubuntu archive) compile correctly for all supported Ubuntu kernels. This means that if you see DKMS build failures, it's most likely due to the fact, that you have unsupported DKMS modules installed.
If you encounter a linux-headers package installation failure, you can check the log '/var/log/dpkg.log' for something like the following:
-------
Building module:
Cleaning build area...(bad exit status: 2)
make -j12 KERNELRELEASE=
Error! Bad return status for module build on kernel: 6.5.0-35-generic (x86_64)
Consult /var/lib/
dkms autoinstall on 6.5.0-35-
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
* dkms: autoinstall for kernel 6.5.0-35-generic
...fail!
run-parts: /etc/kernel/
-------
or:
-------
/etc/kernel/
* dkms: running auto installation service for kernel 6.5.0-18-generic
Error! Could not locate dkms.conf file.
File: /var/lib/
...fail!
run-parts: /etc/kernel/
-------
You need to remove the unsupported/broken DKMS module to be able to install the new kernel packages:
$ dkms remove <name>/<version>
For the above examples, that would be:
$ dkms remove amdgpu/
**IMPORTANT**
This is *not* a kernel problem.
Changed in linux (Ubuntu): | |
status: | New → Invalid |
summary: |
- package linux-headers-<kernel_version> <package_version> failed to - install/upgrade: installed linux-headers-6.8.0-35-generic package post- - installation script subprocess returned error exit status 11 + package linux-headers-<version> <version> failed to install/upgrade: + installed linux-headers-<version> package post-installation script + subprocess returned error exit status 11 |
description: | updated |
summary: |
package linux-headers-<version> <version> failed to install/upgrade: installed linux-headers-<version> package post-installation script - subprocess returned error exit status 11 + subprocess returned error exit status 4|11 |
description: | updated |
description: | updated |
summary: |
package linux-headers-<version> <version> failed to install/upgrade: installed linux-headers-<version> package post-installation script - subprocess returned error exit status 4|11 + subprocess returned error exit status |
description: | updated |
Changed in linux (Ubuntu): | |
importance: | Undecided → Medium |
description: | updated |
Thanks for your support.
Actually, it was not a kernel problem.
I've solved it with removing some packages.