我现在的版本
$ cat /etc/*elease*
PRETTY_NAME="Debian GNU/Linux 12 (bookworm)"
NAME="Debian GNU/Linux"
VERSION_ID="12"
VERSION="12 (bookworm)"
VERSION_CODENAME=bookworm
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
我运行的确切命令是
sudo aptitude update && sudo aptitude safe-upgrade"
这是我收到的错误(我猜它们之间都有联系)
/etc/kernel/header_postinst.d/dkms:
dkms: running auto installation service for kernel 6.1.0-9-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' -j8 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=6.1.0-9-amd64 IGNORE_CC_MISMATCH='' modules.....(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.1.0-9-amd64 (x86_64)
Consult /var/lib/dkms/nvidia/418.113/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-9-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-9-amd64.postinst line 11.
dpkg: error processing package linux-headers-6.1.0-9-amd64 (--configure):
installed linux-headers-6.1.0-9-amd64 package post-installation script subprocess returned error exit status 1
Setting up libgnuradio-audio3.10.5:amd64 (3.10.5.1-3) ...
Setting up gcc-11 (11.3.0-14) ...
Setting up libgnuradio-zeromq3.10.5:amd64 (3.10.5.1-3) ...
Setting up console-setup-linux (1.220) ...
Setting up libgnuradio-qtgui3.10.5:amd64 (3.10.5.1-3) ...
Setting up console-setup (1.220) ...
Setting up libncurses-dev:amd64 (6.4-4) ...
dpkg: dependency problems prevent configuration of linux-headers-amd64:
linux-headers-amd64 depends on linux-headers-6.1.0-9-amd64 (= 6.1.27-1); however:
Package linux-headers-6.1.0-9-amd64 is not configured yet.
dpkg: error processing package linux-headers-amd64 (--configure):
dependency problems - leaving unconfigured
Setting up libgnuradio-dtv3.10.5:amd64 (3.10.5.1-3) ...
Setting up libgnuradio-analog3.10.5:amd64 (3.10.5.1-3) ...
Setting up libgnuradio-digital3.10.5:amd64 (3.10.5.1-3) ...
Setting up libstdc++-11-dev:amd64 (11.3.0-14) ...
Setting up libgnuradio-channels3.10.5:amd64 (3.10.5.1-3) ...
Setting up libtinfo-dev:amd64 (6.4-4) ...
Setting up g++-11 (11.3.0-14) ...
Setting up gnuradio (3.10.5.1-3) ...
Setting up gnuradio-dev (3.10.5.1-3) ...
Processing triggers for shared-mime-info (2.2-1) ...
Processing triggers for mailcap (3.70+nmu1) ...
Processing triggers for desktop-file-utils (0.26-1) ...
Processing triggers for hicolor-icon-theme (0.17-2) ...
Processing triggers for gnome-menus (3.36.0-1.1) ...
Processing triggers for libglib2.0-0:amd64 (2.74.6-2) ...
Processing triggers for libglib2.0-0:i386 (2.74.6-2) ...
Processing triggers for libc-bin (2.36-9) ...
Processing triggers for man-db (2.11.2-2) ...
Errors were encountered while processing:
linux-image-6.1.0-8-amd64
linux-image-6.1.0-9-amd64
linux-image-amd64
linux-headers-6.1.0-8-amd64
linux-headers-6.1.0-9-amd64
linux-headers-amd64
needrestart is being skipped since dpkg has failed
E: Sub-process /usr/bin/dpkg returned an error code (1)
Setting up linux-headers-6.1.0-8-amd64 (6.1.25-1) ...
/etc/kernel/header_postinst.d/dkms:
dkms: running auto installation service for kernel 6.1.0-8-amd64.
/usr/sbin/dkms: line 2497: echo: write error: Broken pipe
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' -j8 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=6.1.0-8-amd64 IGNORE_CC_MISMATCH='' modules.....(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.1.0-8-amd64 (x86_64)
Consult /var/lib/dkms/nvidia/418.113/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-8-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-8-amd64.postinst line 11.
dpkg: error processing package linux-headers-6.1.0-8-amd64 (--configure):
installed linux-headers-6.1.0-8-amd64 package post-installation script subprocess returned error exit status 1
Setting up linux-image-6.1.0-8-amd64 (6.1.25-1) ...
I: /initrd.img.old is now a symlink to boot/initrd.img-6.1.0-8-amd64
/etc/kernel/postinst.d/dkms:
dkms: running auto installation service for kernel 6.1.0-8-amd64.
/usr/sbin/dkms: line 2497: echo: write error: Broken pipe
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' -j8 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=6.1.0-8-amd64 IGNORE_CC_MISMATCH='' modules.....(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.1.0-8-amd64 (x86_64)
Consult /var/lib/dkms/nvidia/418.113/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-8-amd64 failed!
run-parts: /etc/kernel/postinst.d/dkms exited with return code 11
dpkg: error processing package linux-image-6.1.0-8-amd64 (--configure):
installed linux-image-6.1.0-8-amd64 package post-installation script subprocess returned error exit status 1
Setting up linux-image-6.1.0-9-amd64 (6.1.27-1) ...
I: /initrd.img is now a symlink to boot/initrd.img-6.1.0-9-amd64
/etc/kernel/postinst.d/dkms:
dkms: running auto installation service for kernel 6.1.0-9-amd64.
/usr/sbin/dkms: line 2497: echo: write error: Broken pipe
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' -j8 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=6.1.0-9-amd64 IGNORE_CC_MISMATCH='' modules.....(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.1.0-9-amd64 (x86_64)
Consult /var/lib/dkms/nvidia/418.113/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-9-amd64 failed!
run-parts: /etc/kernel/postinst.d/dkms exited with return code 11
dpkg: error processing package linux-image-6.1.0-9-amd64 (--configure):
installed linux-image-6.1.0-9-amd64 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-image-amd64:
linux-image-amd64 depends on linux-image-6.1.0-9-amd64 (= 6.1.27-1); however:
Package linux-image-6.1.0-9-amd64 is not configured yet.
dpkg: error processing package linux-image-amd64 (--configure):
dependency problems - leaving unconfigured
Setting up linux-headers-6.1.0-9-amd64 (6.1.27-1) ...
/etc/kernel/header_postinst.d/dkms:
dkms: running auto installation service for kernel 6.1.0-9-amd64.
/usr/sbin/dkms: line 2497: echo: write error: Broken pipe
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' -j8 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=6.1.0-9-amd64 IGNORE_CC_MISMATCH='' modules.....(bad exit status: 2)
Error! Bad return status for module build on kernel: 6.1.0-9-amd64 (x86_64)
Consult /var/lib/dkms/nvidia/418.113/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-9-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-9-amd64.postinst line 11.
dpkg: error processing package linux-headers-6.1.0-9-amd64 (--configure):
installed linux-headers-6.1.0-9-amd64 package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of linux-headers-amd64:
linux-headers-amd64 depends on linux-headers-6.1.0-9-amd64 (= 6.1.27-1); however:
Package linux-headers-6.1.0-9-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-8-amd64
linux-image-6.1.0-8-amd64
linux-image-6.1.0-9-amd64
linux-image-amd64
linux-headers-6.1.0-9-amd64
linux-headers-amd64
Current status: 1 (-88) upgradable.```
Do I have to *(re)*install missing modules and if so how can I get their list ; or this is not at all the solution so then can you provide a procedure ?
答案1
OP各州使用新司机而不是英伟达驱动程序。但似乎有一个旧的 nvidia DKMS 包来自大约 2020-04-26仍然存在,它与较新的内核不兼容,并且由于其构建失败而导致其安装失败。
对于这种情况:
apt-get -f purge nvidia-kernel-dkms
应该可以解决问题。如果该包实际上不再存在,但 DKMS 仍处理它的一些残余,那么借助:
dkms status
应该能够删除英伟达dkms remove
条目仍由 DKMS 使用等进行管理。
如果确实需要这个非自由驱动程序,那么应该将non-free
(可能还有contrib
)存储库添加到 Debian 源列表中(如果不存在),并将此包升级到 bookworm 版本(截至今天525.105.17)有关更多信息,请参阅 Debian 的 wikiNvidia 显卡驱动程序。