我几周前更新到了 23.04,但是软件更新程序现在不断通知我有新的更新,但每次我通过此过程更新时都会失败并显示以下错误消息。
我已经尝试过sudo apt clean
、、sudo apt autoclean
和sudo apt autoremove
,但没有帮助。
sudo apt update
如果我在执行和之后使用命令行sudo apt upgrade
,我会得到以下结果:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
gir1.2-gtk-4.0 libgtk-4-1 libgtk-4-bin libgtk-4-common
libgtk-4-media-gstreamer
0 to upgrade, 0 to newly install, 0 to remove and 5 not to upgrade.
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
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/rtbth/3.9.7/source/dkms.conf)
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/rtbth/3.9.7/source/dkms.conf)
Deprecated feature: REMAKE_INITRD (/etc/dkms/framework.conf)
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/rtbth/3.9.7/source/dkms.conf)
Building module:
Cleaning build area...
make -j16 KERNELRELEASE=6.2.0-20-generic -C /lib/modules/6.2.0-20-generic/build M=/var/lib/dkms/rtbth/3.9.7/build...(bad exit status: 2)
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/rtbth-dkms.0.crash'
Error! Bad return status for module build on kernel: 6.2.0-20-generic (x86_64)
Consult /var/lib/dkms/rtbth/3.9.7/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
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
No apport report written because the error message indicates it's a follow-up error from a previous failure.
No apport report written because the error message indicates it's a follow-up error from a previous failure.
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
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
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/rtbth/3.9.7/source/dkms.conf)
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/rtbth/3.9.7/source/dkms.conf)
Deprecated feature: REMAKE_INITRD (/etc/dkms/framework.conf)
Sign command: /usr/bin/kmodsign
Signing key: /var/lib/shim-signed/mok/MOK.priv
Public certificate (MOK): /var/lib/shim-signed/mok/MOK.der
Deprecated feature: REMAKE_INITRD (/var/lib/dkms/rtbth/3.9.7/source/dkms.conf)
Building module:
Cleaning build area...
make -j16 KERNELRELEASE=6.2.0-20-generic -C /lib/modules/6.2.0-20-generic/build M=/var/lib/dkms/rtbth/3.9.7/build...(bad exit status: 2)
ERROR: Cannot create report: [Errno 17] File exists: '/var/crash/rtbth-dkms.0.crash'
Error! Bad return status for module build on kernel: 6.2.0-20-generic (x86_64)
Consult /var/lib/dkms/rtbth/3.9.7/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 has already been reached
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)
输出自:cat /var/lib/dkms/rtbth/3.9.7/source/dkms.conf
PACKAGE_NAME="rtbth"
PACKAGE_VERSION="3.9.7"
BUILT_MODULE_NAME[0]="rtbth"
DEST_MODULE_LOCATION[0]="/updates/dkms"
AUTOINSTALL="yes"
REMAKE_INITRD="yes"
答案1
在
/var/lib/dkms/rtbth/3.9.7/source/dkms.conf
删除部分
REMAKE_INITRD="yes"
然后让 apt 尝试修复它
sudo apt -f install