Skip to content

Instantly share code, notes, and snippets.

@gengwg
Created February 26, 2024 05:01
Show Gist options
  • Save gengwg/4368bd926009984f8a32beac2b0b3358 to your computer and use it in GitHub Desktop.
Save gengwg/4368bd926009984f8a32beac2b0b3358 to your computer and use it in GitHub Desktop.
dpkg: dependency problems prevent configuration of linux-headers-amd64:
```
$ sudo apt upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
linux-headers-6.1.0-18-amd64 linux-headers-6.1.0-18-common
The following packages have been kept back:
ca-certificates-java
The following packages will be upgraded:
linux-headers-amd64
1 upgraded, 2 newly installed, 0 to remove and 1 not upgraded.
2 not fully installed or removed.
Need to get 11.3 MB of archives.
After this operation, 61.5 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://deb.debian.org/debian bookworm/main amd64 linux-headers-6.1.0-18-common all 6.1.76-1 [9,958 kB]
Get:2 http://deb.debian.org/debian bookworm/main amd64 linux-headers-6.1.0-18-amd64 amd64 6.1.76-1 [1,315 kB]
Get:3 http://deb.debian.org/debian bookworm/main amd64 linux-headers-amd64 amd64 6.1.76-1 [1,420 B]
Fetched 11.3 MB in 11s (981 kB/s)
Reading changelogs... Done
Selecting previously unselected package linux-headers-6.1.0-18-common.
(Reading database ... 341063 files and directories currently installed.)
Preparing to unpack .../linux-headers-6.1.0-18-common_6.1.76-1_all.deb ...
Unpacking linux-headers-6.1.0-18-common (6.1.76-1) ...
Selecting previously unselected package linux-headers-6.1.0-18-amd64.
Preparing to unpack .../linux-headers-6.1.0-18-amd64_6.1.76-1_amd64.deb ...
Unpacking linux-headers-6.1.0-18-amd64 (6.1.76-1) ...
Preparing to unpack .../linux-headers-amd64_6.1.76-1_amd64.deb ...
Unpacking linux-headers-amd64 (6.1.76-1) over (6.1.69-1) ...
Setting up linux-headers-6.1.0-17-amd64 (6.1.69-1) ...
/etc/kernel/header_postinst.d/dkms:
dkms: running auto installation service for kernel 6.1.0-17-amd64.
Sign command: /usr/lib/linux-kbuild-6.1/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Building module:
Cleaning build area...
'make' all KVER=6.1.0-17-amd64...(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.1.0-17-amd64 (x86_64)
Consult /var/lib/dkms/8812au/4.2.2/build/make.log for more information.
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
dkms: autoinstall for kernel: 6.1.0-17-amd64 failed!
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 11
Failed to process /etc/kernel/header_postinst.d at /var/lib/dpkg/info/linux-headers-6.1.0-17-am
d64.postinst line 11.
dpkg: error processing package linux-headers-6.1.0-17-amd64 (--configure):
installed linux-headers-6.1.0-17-amd64 package post-installation script subprocess returned er
ror exit status 1
Setting up linux-headers-6.1.0-18-common (6.1.76-1) ...
Setting up linux-headers-6.1.0-18-amd64 (6.1.76-1) ...
/etc/kernel/header_postinst.d/dkms:
dkms: running auto installation service for kernel 6.1.0-18-amd64.
Sign command: /usr/lib/linux-kbuild-6.1/scripts/sign-file
Signing key: /var/lib/dkms/mok.key
Public certificate (MOK): /var/lib/dkms/mok.pub
Building module:
Cleaning build area...
'make' all KVER=6.1.0-18-amd64...(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.1.0-18-amd64 (x86_64)
Consult /var/lib/dkms/8812au/4.2.2/build/make.log for more information.
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
dkms: autoinstall for kernel: 6.1.0-18-amd64 failed!
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 11
Failed to process /etc/kernel/header_postinst.d at /var/lib/dpkg/info/linux-headers-6.1.0-18-am
d64.postinst line 11.
dpkg: error processing package linux-headers-6.1.0-18-amd64 (--configure):
installed linux-headers-6.1.0-18-amd64 package post-installation script subprocess returned er
ror exit status 1
dpkg: dependency problems prevent configuration of linux-headers-amd64:
linux-headers-amd64 depends on linux-headers-6.1.0-18-amd64 (= 6.1.76-1); however:
Package linux-headers-6.1.0-18-amd64 is not configured yet.
dpkg: error processing package linux-headers-amd64 (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
linux-headers-6.1.0-17-amd64
linux-headers-6.1.0-18-amd64
linux-headers-amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
```
Solution:
```
$ sudo dkms status
8812au/4.2.2, 5.10.0-13-amd64, x86_64: installed
# verify it's not being used by current wifi
$ lspci -nnk | grep -i net -A2
01:00.0 Network controller [0280]: Qualcomm Atheros QCA9377 802.11ac Wireless Network Adapter [168c:0042] (rev 31)
Subsystem: Lenovo Qualcomm Atheros QCA9377 Wireless Network Adapter [17aa:0901]
Kernel driver in use: ath10k_pci
Kernel modules: ath10k_pci
# remove it
$ sudo dkms remove -m 8812au -v 4.2.2 --all
Module 8812au-4.2.2 for kernel 5.10.0-13-amd64 (x86_64).
Before uninstall, this module version was ACTIVE on this kernel.
8812au.ko:
- Uninstallation
- Deleting from: /lib/modules/5.10.0-13-amd64/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
depmod...
Deleting module 8812au-4.2.2 completely from the DKMS tree.
```
Now worked:
```
The following packages have been kept back:
ca-certificates-java
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up linux-headers-6.1.0-18-amd64 (6.1.76-1) ...
/etc/kernel/header_postinst.d/dkms:
dkms: running auto installation service for kernel 6.1.0-18-amd64.
dkms: autoinstall for kernel: 6.1.0-18-amd64.
Setting up linux-headers-6.1.0-17-amd64 (6.1.69-1) ...
/etc/kernel/header_postinst.d/dkms:
dkms: running auto installation service for kernel 6.1.0-17-amd64.
dkms: autoinstall for kernel: 6.1.0-17-amd64.
Setting up linux-headers-amd64 (6.1.76-1) ...
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment