package linux-headers-<version> <version> failed to install/upgrade: installed linux-headers-<version> package post-installation script subprocess returned error exit status

Bug #2068107 reported by Juerg Haefliger
752
This bug affects 94 people
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=6.5.0-35-generic TTM_NAME=amdttm SCHED_NAME=amd-sched -C /lib/modules/6.5.0-35-generic/build M=/var/lib/dkms/amdgpu/6.2.4-1683306.22.04/build...(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.5.0-35-generic (x86_64)
Consult /var/lib/dkms/amdgpu/6.2.4-1683306.22.04/build/make.log for more information.
dkms autoinstall on 6.5.0-35-generic/x86_64 failed for amdgpu(10)
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/header_postinst.d/dkms exited with return code 11
--------------------------------------------------------------------------------

or:

--------------------------------------------------------------------------------
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 6.5.0-18-generic
Error! Could not locate dkms.conf file.
File: /var/lib/dkms/amdgpu/6.2.4-1683386.22.04/source/dkms.conf does not exist.
   ...fail!
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 4
--------------------------------------------------------------------------------

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/6.2.4-1683306.22.04

**IMPORTANT**

This is *not* a kernel problem.

Juerg Haefliger (juergh)
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
Juerg Haefliger (juergh)
description: updated
Juerg Haefliger (juergh)
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
Juerg Haefliger (juergh)
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
Juerg Haefliger (juergh)
description: updated
Juerg Haefliger (juergh)
Changed in linux (Ubuntu):
importance: Undecided → Medium
Juerg Haefliger (juergh)
description: updated
Revision history for this message
François Blanchard (francois-blanchard) wrote :

Thanks for your support.
Actually, it was not a kernel problem.
I've solved it with removing some packages.

Revision history for this message
Wedyn F Rodriguez (wedfrod) wrote : Re: [Bug 2068107] Re: package linux-headers-<version> <version> failed to install/upgrade: installed linux-headers-<version> package post-installation script subprocess returned error exit status
Download full text (3.6 KiB)

Thanks for your kindness.

On Thu, Jun 6, 2024 at 3:35 AM François Blanchard <
<email address hidden>> wrote:

> Thanks for your support.
> Actually, it was not a kernel problem.
> I've solved it with removing some packages.
>
> --
> You received this bug notification because you are subscribed to a
> duplicate bug report (2067950).
> https://bugs.launchpad.net/bugs/2068107
>
> Title:
> package linux-headers-<version> <version> failed to install/upgrade:
> installed linux-headers-<version> package post-installation script
> subprocess returned error exit status
>
> Status in linux package in Ubuntu:
> Invalid
>
> 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=6.5.0-35-generic TTM_NAME=amdttm
> SCHED_NAME=amd-sched -C /lib/modules/6.5.0-35-generic/build
> M=/var/lib/dkms/amdgpu/6.2.4-1683306.22.04/build...(bad exit status: 2)
> Error! Bad return status for module build on kernel: 6.5.0-35-generic
> (x86_64)
> Consult /var/lib/dkms/amdgpu/6.2.4-1683306.22.04/build/make.log for more
> information.
> dkms autoinstall on 6.5.0-35-generic/x86_64 failed for amdgpu(10)
> 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/header_postinst.d/dkms exited with return code 11
>
> --------------------------------------------------------------------------------
>
> or:
>
>
> --------------------------------------------------------------------------------
> /etc/kernel/header_postinst.d/dkms:
> * dkms: running auto installation service for kernel 6.5.0-18-generic
> Error! Could not locate dkms.conf file.
> File: /var/lib/dkms/amdgpu/6.2.4-1683386.22.04/source/dkms.conf does not
> exist.
> ...fail!
> run-parts: /etc/kernel/header_postinst.d/dkms exited with return c...

Read more...

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.