apt full-upgrade Debian 11 至 Debian 12:处理时遇到错误:linux-headers-6.1.0-20-amd64

apt full-upgrade Debian 11 至 Debian 12:处理时遇到错误:linux-headers-6.1.0-20-amd64

最近遇到了将 Debian 10 升级到 Debian 11 到 Debian 12 的问题

apt full-upgrade
...
Error! The /var/lib/dkms/aufs/4.19+20190211/6.1.0-20-amd64/x86_64/dkms.conf for module aufs includes a BUILD_EXCLUSIVE directive which does not match this kernel/arch/config.
This indicates that it should not be built.
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
dkms: autoinstall for kernel: 6.1.0-20-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-20-amd64.postinst line 11.
ESC[1mdpkg:ESC[0m error processing package linux-headers-6.1.0-20-amd64 (--configure):
 installed linux-headers-6.1.0-20-amd64 package post-installation script subprocess returned error exit status 1
ESC[1mdpkg:ESC[0m dependency problems prevent configuration of linux-headers-amd64:
 linux-headers-amd64 depends on linux-headers-6.1.0-20-amd64 (= 6.1.85-1); however:
  Package linux-headers-6.1.0-20-amd64 is not configured yet.

ESC[1mdpkg:ESC[0m error processing package linux-headers-amd64 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-headers-6.1.0-20-amd64
 linux-headers-amd64

答案1

解决方案是:

apt-get remove dkms
apt-get install dkms

相关内容