Error while installing package "postint maintainer script subprocess failed"

Ubuntu Version:
26.04

Desktop Environment (if applicable):
KDE Plasma

Problem Description:
When trying to update through Discover, I keep getting a message that there is a problem with the update, and when I view details, I keep getting the message below.

Screenshots or Error Messages:

Package failed to install:

Error while installing package: old linux-headers-7.0.0-22-generic package postinst maintainer script subprocess failed with exit status 1

What I’ve Tried:
Restarting the computer. I just keep getting the prompt to update again, and then it closes.

Perhaps, Discover is temporarily misbehaving
Try via the terminal

sudo apt update
sudo apt upgrade

Alternatively

sudo apt full-upgrade

From man apt

full-upgrade performs the function of upgrade but will remove currently installed packages if this is needed to upgrade the system as a whole

1 Like

Gave full-upgrade a try, and this was the output:

Get more security updates through Ubuntu Pro with 'esm-apps' enabled:
  node-lodash-packages python3-pip-whl node-shell-quote libopenexr-3-1-30
  node-lodash python3-pip python3-nltk
Learn more about Ubuntu Pro at https://ubuntu.com/pro
Not upgrading yet due to phasing:
  resources

Summary:
  Upgrading: 0, Installing: 0, Removing: 0, Not Upgrading: 1
  7 not fully installed or removed.
  Space needed: 0 B / 1,366 GB available

Continue? [Y/n] y
Setting up linux-headers-7.0.0-22-generic (7.0.0-22.22)…
/etc/kernel/header_postinst.d/dkms:
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der

Autoinstall of module hid-xpadneo/v0.9-222-gcd25680 for kernel 7.0.0-22-generic (x86_64)
Building module(s)...(bad exit status: 2)
Failed command:
make -j12 KERNELRELEASE=7.0.0-22-generic -C '/lib/modules/7.0.0-22-generic/build' M='/var/lib/dkms/hid-xpadneo/v0.9-222-gcd25680/build/src' VERSION='v0.9-222-gcd25680' modules
ERROR (dkms apport): binary package for hid-xpadneo: v0.9-222-gcd25680 not found

Error! Bad return status for module build on kernel: 7.0.0-22-generic (x86_64)
Consult /var/lib/dkms/hid-xpadneo/v0.9-222-gcd25680/build/make.log for more information.

Autoinstall on 7.0.0-22-generic failed for module(s) hid-xpadneo(10).

Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 1
dpkg: error processing package linux-headers-7.0.0-22-generic (--configure):
 old linux-headers-7.0.0-22-generic package postinst maintainer script subprocess failed with exit status 1
dpkg: dependency problems prevent configuration of linux-headers-generic:
 linux-headers-generic depends on linux-headers-7.0.0-22-generic; however:
  Package linux-headers-7.0.0-22-generic is not configured yet.

dpkg: error processing package linux-headers-generic (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-headers-generic-hwe-26.04:
 linux-headers-generic-hwe-26.04 depends on linux-headers-7.0.0-22-generic; however:
  Package linux-headers-7.0.0-22-generic is not configured yet.

dpkg: error processing package linux-headers-generic-hwe-26.04 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic-hwe-26.04:
 linux-generic-hwe-26.04 depends on linux-headers-generic-hwe-26.04 (= 7.0.0-22.22); however:
  Package linux-headers-generic-hwe-26.04 is not configured yet.

dpkg: error processing package linux-generic-hwe-26.04 (--configure):
 dependency problems - leaving unconfigured
Setting up linux-image-7.0.0-22-generic (7.0.0-22.22)…
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                                                                                                                                    No apport report written because MaxReports is reached already
                                      dpkg: dependency problems prevent configuration of linux-generic:
 linux-generic depends on linux-headers-generic (= 7.0.0-22.22); however:
  Package linux-headers-generic is not configured yet.

dpkg: error processing package linux-generic (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
                                                              No apport report written because MaxReports is reached already
                                                                                                                            dpkg: dependency problems prevent configuration of linux-generic-hwe-24.04:
 linux-generic-hwe-24.04 depends on linux-generic-hwe-26.04; however:
  Package linux-generic-hwe-26.04 is not configured yet.

dpkg: error processing package linux-generic-hwe-24.04 (--configure):
 dependency problems - leaving unconfigured
Processing triggers for linux-image-7.0.0-22-generic (7.0.0-22.22)…
/etc/kernel/postinst.d/dkms:
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der

Autoinstall of module hid-xpadneo/v0.9-222-gcd25680 for kernel 7.0.0-22-generic (x86_64)
Building module(s)...(bad exit status: 2)
Failed command:
make -j12 KERNELRELEASE=7.0.0-22-generic -C '/lib/modules/7.0.0-22-generic/build' M='/var/lib/dkms/hid-xpadneo/v0.9-222-gcd25680/build/src' VERSION='v0.9-222-gcd25680' modules
ERROR (dkms apport): binary package for hid-xpadneo: v0.9-222-gcd25680 not found

Error! Bad return status for module build on kernel: 7.0.0-22-generic (x86_64)
Consult /var/lib/dkms/hid-xpadneo/v0.9-222-gcd25680/build/make.log for more information.

Autoinstall on 7.0.0-22-generic failed for module(s) hid-xpadneo(10).

Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
run-parts: /etc/kernel/postinst.d/dkms exited with return code 1
dpkg: error processing package linux-image-7.0.0-22-generic (--configure):
 old linux-image-7.0.0-22-generic package postinst maintainer script subprocess failed with exit status 1
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 linux-headers-7.0.0-22-generic
 linux-headers-generic
 linux-headers-generic-hwe-26.04
 linux-generic-hwe-26.04
 linux-generic
 linux-generic-hwe-24.04
 linux-image-7.0.0-22-generic
Error: Sub-process /usr/bin/dpkg returned an error code (1)

This is still the problem. Try reinstalling those packages and then (optional) removed any of the them if not needed. You need to fix this in order to update the system and/or install new software.

Where did you get that hid-xpadneo/v0.9-222-gcd25680 thing from, this is surely not from the Ubuntu archive and breaks your kernel installation (most likely because it was not designed for this kernel version and needs the maintainer to update it for newer kernel headers)

You should seek support where you got that code from or simply remove it from your machine to make the kernel update not fail …

3 Likes

I’ll be honest, I can’t remember where I got it from, but it looks like removing it from my machine did the trick. Thanks.

1 Like

This topic was automatically closed 18 hours after the last reply. New replies are no longer allowed.