Score:0

dkms errors when updating / upgrading Ubuntu

us flag

My system stopped an upgrading-process. It only boots into an old Kernel (Linux 5.19.0-40-generic). I have Ubuntu 23.04. When I try sudo apt-upgrade I get errors:


$ sudo apt upgrade
[sudo] password for pepp: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
4 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
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' KVER=6.2.0-20-generic src=/usr/src/rtl88x2bu-5.8.7.1................................................(bad exit status: 2)
ERROR (dkms apport): binary package for rtl88x2bu: 5.8.7.1 not found
Error! Bad return status for module build on kernel: 6.2.0-20-generic (x86_64)
Consult /var/lib/dkms/rtl88x2bu/5.8.7.1/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
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          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
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          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' KVER=6.2.0-20-generic src=/usr/src/rtl88x2bu-5.8.7.1.............................................(bad exit status: 2)
ERROR (dkms apport): binary package for rtl88x2bu: 5.8.7.1 not found
Error! Bad return status for module build on kernel: 6.2.0-20-generic (x86_64)
Consult /var/lib/dkms/rtl88x2bu/5.8.7.1/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
No apport report written because MaxReports is reached already
                                                              Errors were encountered while processing:
 linux-headers-6.2.0-20-generic
 linux-headers-generic
 linux-generic
 linux-image-6.2.0-20-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

Danke for your help everyone! I tried "sudo dkms remove -m rtl88x2bu -v 5.8.7.1 -k --all And sudo apt -f install". Unfortunately it returned errors:


pepp@pepp-E3216-MD61800:~$ sudo dkms remove -m rtl88x2bu -v 5.8.7.1 -k --all

[sudo] password for pepp:  Module rtl88x2bu 5.8.7.1 is not installed for kernel --all (x86_64). Skipping... Module rtl88x2bu 5.8.7.1 is not built for kernel --all (x86_64). Skipping... pepp@pepp-E3216-MD61800:~$ sudo apt -f install Reading package lists... Done Building dependency tree... Done Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 25 not upgraded. 4 not fully installed or removed. After this operation, 0 B of additional disk space will be used. 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' KVER=6.2.0-20-generic src=/usr/src/rtl88x2bu-5.8.7.1...............................................(bad exit status: 2) ERROR (dkms apport): binary package for rtl88x2bu:
5.8.7.1 not found Error! Bad return status for module build on kernel: 6.2.0-20-generic (x86_64) Consult /var/lib/dkms/rtl88x2bu/5.8.7.1/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 subpr ocess 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 No apport report written because the error message indicates its a followup erro r from a previous failure.
                          No apport report written because the error message ind icates its a followup error from a previous failure.
                                                    Processing triggers for linu x-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' KVER=6.2.0-20-generic src=/usr/src/rtl88x2bu-5.8.7.1..................... .............................(bad exit status: 2) ERROR (dkms apport): binary package for rtl88x2bu: 5.8.7.1 not found Error! Bad return status for module build on kernel: 6.2.0-20-generic (x86_64) Consult /var/lib/dkms/rtl88x2bu/5.8.7.1/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 subproc ess returned error exit status 1 No apport report written because MaxReports is reached already
                                                              Errors were encoun tered while processing:  linux-headers-6.2.0-20-generic  linux-headers-generic  linux-generic  linux-image-6.2.0-20-generic E: Sub-process /usr/bin/dpkg returned an error code (1)

When i enter "dpkg - l | grep dkms" i get:

$ dpkg - l | grep dkms
dpkg: error: need an action option

Type dpkg --help for help about installing and deinstalling packages [*];
Use 'apt' or 'aptitude' for user-friendly package management;
Type dpkg -Dhelp for a list of dpkg debug flag values;
Type dpkg --force-help for a list of forcing options;
Type dpkg-deb --help for help about manipulating *.deb files;

Options marked [*] produce a lot of output - pipe it through 'less' or 'more' !

i tried "$ dpkg - l | grep dkms:

dpkg: error: need an action option

Type dpkg --help for help about installing and deinstalling packages [*]; Use 'apt' or 'aptitude' for user-friendly package management; Type dpkg -Dhelp for a list of dpkg debug flag values; Type dpkg
--force-help for a list of forcing options; Type dpkg-deb --help for help about manipulating *.deb files;

Options marked [*] produce a lot of output - pipe it through 'less' or 'more' !

Now i tried "dpkg -l | grep dkms" an received:

>  ii  dkms                                             3.0.10-7        
> all          Dynamic Kernel Module System (DKMS)

Errors again :-(


sudo apt upgrade

[sudo] password for pepp: Reading package lists... Done Building dependency tree... Done Reading state information... Done Calculating upgrade... Done The following packages have been kept back: gnome-video-effects linux-generic linux-headers-generic linux-image-generic ubuntu-drivers-common The following packages will be upgraded: cups-browsed linux-libc-dev 2 upgraded, 0 newly installed, 0 to remove and 5 not upgraded. 4 not fully installed or removed. Need to get 125 kB/1.661 kB 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://archive.ubuntu.com/ubuntu lunar-updates/main amd64 cups-browsed amd64 2.0~rc1-0ubuntu1.1 [125 kB] Fetched 125 kB in 0s (264 kB/s)
dpkg: warning: files list file for package 'linux-headers-5.15.0-46' missing; assuming package has no files currently installed dpkg: warning: files list file for package 'linux-headers-5.15.0-46-generic' missing; assuming package has no files currently installed (Reading database ... 356329 files and directories currently installed.) Preparing to unpack .../cups-browsed_2.0~rc1-0ubuntu1.1_amd64.deb ... Unpacking cups-browsed (2.0~rc1-0ubuntu1.1) over (2.0~rc1-0ubuntu1) ... Preparing to unpack .../linux-libc-dev_6.2.0-24.24_amd64.deb ... Unpacking linux-libc-dev:amd64 (6.2.0-24.24) over (6.2.0-23.23) ... Setting up cups-browsed (2.0~rc1-0ubuntu1.1) ... Setting up linux-headers-6.2.0-23-generic (6.2.0-23.23) ... /etc/kernel/header_postinst.d/dkms:

  • dkms: running auto installation service for kernel 6.2.0-23-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' KVER=6.2.0-23-generic src=/usr/src/rtl88x2bu-5.8.7.1..................................................(bad exit status: 2) ERROR (dkms apport): binary package for rtl88x2bu: 5.8.7.1 not found Error! Bad return status for module build on kernel: 6.2.0-23-generic (x86_64) Consult /var/lib/dkms/rtl88x2bu/5.8.7.1/build/make.log for more information. dkms autoinstall on 6.2.0-23-generic/x86_64 failed for rtl88x2bu(10) 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-23-generic (--configure): installed linux-headers-6.2.0-23-generic package post-installation script subprocess returned error exit status 1 Setting up linux-libc-dev:amd64 (6.2.0-24.24) ... dpkg: dependency problems prevent configuration of linux-headers-generic: linux-headers-generic depends on linux-headers-6.2.0-23-generic; however: Package linux-headers-6.2.0-23-generic is not configured yet.

dpkg: error processing package linux-headers-generic (--configure): dependency problems - leaving unconfigured Setting up linux-image-6.2.0-23-generic (6.2.0-23.23) ... 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-headers-generic (= 6.2.0.23.23); 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 the error message indicates its a followup error from a previous failure. Processing triggers for man-db (2.11.2-1) ... Processing triggers for linux-image-6.2.0-23-generic (6.2.0-23.23) ... /etc/kernel/postinst.d/dkms:

  • dkms: running auto installation service for kernel 6.2.0-23-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' KVER=6.2.0-23-generic src=/usr/src/rtl88x2bu-5.8.7.1................................................(bad exit status: 2) ERROR (dkms apport): binary package for rtl88x2bu: 5.8.7.1 not found Error! Bad return status for module build on kernel: 6.2.0-23-generic (x86_64) Consult /var/lib/dkms/rtl88x2bu/5.8.7.1/build/make.log for more information. dkms autoinstall on 6.2.0-23-generic/x86_64 failed for rtl88x2bu(10) 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-23-generic (--configure): installed linux-image-6.2.0-23-generic package post-installation script subprocess returned error exit status 1 No apport report written because MaxReports is reached already Errors were encountered while processing: linux-headers-6.2.0-23-generic linux-headers-generic linux-generic linux-image-6.2.0-23-generic E: Sub-process /usr/bin/dpkg returned an error code (1)

nobody avatar
gh flag
`dkms status` please.
Peter avatar
us flag
dkms status rtl88x2bu/5.8.7.1, 5.13.0-39-generic, x86_64: built
nobody avatar
gh flag
Oh verpennt. `sudo dkms remove -m rtl88x2bu -v 5.8.7.1 -k --all` And `sudo apt -f install`
Peter avatar
us flag
Danke! Unfortunately it gave me errors:
nobody avatar
gh flag
Oh you have after cleaning the module from dkms tree remove the disturbing package `dpkg - l | grep dkms` please. I get old.
Peter avatar
us flag
Danke für deine Hilfe, nobody!
Score:0
gh flag
sudo dkms remove -m rtl88x2bu -v 5.8.7.1 -k --all

Reomves the desturbing module again.

mkdir -p $HOME/apt-download/partial/

Then we download package dkms so your have it on your system.

sudo apt-get -d -o dir::cache::archives="$HOME/apt-download/" install --reinstall dkms

Now package dkms is in $HOME/apt-download/ so you can install with apt or dpkg for security reason; because we have to get rid of it first.

sudo dpkg -P dkms

Check with

df -h;df -i 

if enough space and inodes free especially if you have an own boot filesystem.

sudo apt update && sudo apt -f install
Peter avatar
us flag
Thank you so much, nobody! It finally worked. I had to reinstall dkms on the way, everything else worked smoothly. :-)))
nobody avatar
gh flag
@Peter saying thank you here is to accept the answer that works :D.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.