错误!内核 6.5.0-10-generic (x86_64) 模块构建返回状态错误

错误!内核 6.5.0-10-generic (x86_64) 模块构建返回状态错误

一周前,我从 23.04 升级到了 Ubuntu Server 23.10。昨天,在运行常规点文件更新时,我收到了几个内核升级到 6.5.0-10 的错误。现在它会自动启动到 GRUB。这是运行更新时的输出。

Updating dotfiles...
From https://github.com/denysdovhan/dotfiles
 * branch            master     -> FETCH_HEAD
Already up to date.
All targets have been cleaned
Globs from 'home/.*': ['home/.vimrc', 'home/.zshrc', 'home/.czrc', 'home/.gitignore', 'home/.config', 'home/.gitconfig']
Link exists ~/.vimrc -> /home/caleb/.dotfiles/home/.vimrc
Link exists ~/.zshrc -> /home/caleb/.dotfiles/home/.zshrc
Link exists ~/.czrc -> /home/caleb/.dotfiles/home/.czrc
Link exists ~/.gitignore -> /home/caleb/.dotfiles/home/.gitignore
Link exists ~/.config -> /home/caleb/.dotfiles/home/.config
Link exists ~/.gitconfig -> /home/caleb/.dotfiles/home/.gitconfig
All links have been set up
Path exists /home/caleb/.config
All paths have been set up
Skipping action shell

==> All tasks executed successfully
Updating Zsh plugins...
Loaded ~/.config/sheldon/plugins.toml
   Checked ~/.dotfiles/prompt
   Checked https://github.com/djui/alias-tips
   Checked https://github.com/hlissner/zsh-autopair
   Checked https://github.com/agkozak/zsh-z
   Checked https://github.com/romkatv/zsh-defer
   Checked https://github.com/spaceship-prompt/spaceship-prompt
   Checked https://github.com/marzocchi/zsh-notify
   Checked ~/.dotfiles/lib
   Checked https://github.com/ohmyzsh/ohmyzsh
   Checked https://github.com/chriskempson/base16-shell
   Checked https://github.com/lukechilds/zsh-better-npm-completion
   Checked https://github.com/zsh-users/zsh-syntax-highlighting
   Checked https://github.com/zsh-users/zsh-autosuggestions
Locked ~/.local/share/sheldon/plugins.lock
Done!

Updating Ubuntu and installed packages...
Hit:1 https://download.docker.com/linux/ubuntu lunar InRelease
Hit:2 https://repo.homebridge.io stable InRelease
Hit:3 https://download.mono-project.com/repo/ubuntu stable-focal InRelease
Hit:4 http://us.archive.ubuntu.com/ubuntu mantic InRelease
Hit:5 https://downloads.1password.com/linux/debian/amd64 stable InRelease
Hit:6 http://us.archive.ubuntu.com/ubuntu mantic-updates InRelease
Hit:7 http://us.archive.ubuntu.com/ubuntu mantic-backports InRelease
Hit:8 https://repositories.intel.com/graphics/ubuntu focal InRelease
Hit:9 http://security.ubuntu.com/ubuntu mantic-security InRelease
Hit:10 http://archive.ubuntu.com/ubuntu mantic InRelease
Hit:11 http://archive.ubuntu.com/ubuntu mantic-updates InRelease
Hit:12 http://archive.ubuntu.com/ubuntu mantic-backports InRelease
Reading package lists... Done
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.
Setting up linux-image-6.5.0-10-generic (6.5.0-10.10) ...
Setting up linux-headers-6.5.0-10-generic (6.5.0-10.10) ...
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 6.5.0-10-generic
Sign command: /usr/bin/kmodsign
Binary update-secureboot-policy not found, modules won't be signed

Building module:
Cleaning build area...
'make' KDIR=/lib/modules/6.5.0-10-generic/build...(bad exit status: 2)
ERROR (dkms apport): binary package for sgx: 1.41 not found
Error! Bad return status for module build on kernel: 6.5.0-10-generic (x86_64)
Consult /var/lib/dkms/sgx/1.41/build/make.log for more information.
dkms autoinstall on 6.5.0-10-generic/x86_64 failed for sgx(10)
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
 * dkms: autoinstall for kernel 6.5.0-10-generic
   ...fail!
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 11
dpkg: error processing package linux-headers-6.5.0-10-generic (--configure):
 installed linux-headers-6.5.0-10-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.5.0-10-generic; however:
  Package linux-headers-6.5.0-10-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.5.0.10.12); 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.
                                                                                                          No apport report written because the error message indicates its a followup error from a previous failure.
          Processing triggers for linux-image-6.5.0-10-generic (6.5.0-10.10) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 6.5.0-10-generic
Sign command: /usr/bin/kmodsign
Binary update-secureboot-policy not found, modules won't be signed

Building module:
Cleaning build area...
'make' KDIR=/lib/modules/6.5.0-10-generic/build...(bad exit status: 2)
ERROR (dkms apport): binary package for sgx: 1.41 not found
Error! Bad return status for module build on kernel: 6.5.0-10-generic (x86_64)
Consult /var/lib/dkms/sgx/1.41/build/make.log for more information.
dkms autoinstall on 6.5.0-10-generic/x86_64 failed for sgx(10)
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
 * dkms: autoinstall for kernel 6.5.0-10-generic
   ...fail!
run-parts: /etc/kernel/postinst.d/dkms exited with return code 11
dpkg: error processing package linux-image-6.5.0-10-generic (--configure):
 installed linux-image-6.5.0-10-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.5.0-10-generic
 linux-headers-generic
 linux-generic
 linux-image-6.5.0-10-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
Reading package lists... Done
Building dependency tree... Done
Reading state information... 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.
Setting up linux-image-6.5.0-10-generic (6.5.0-10.10) ...
Setting up linux-headers-6.5.0-10-generic (6.5.0-10.10) ...
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 6.5.0-10-generic
Sign command: /usr/bin/kmodsign
Binary update-secureboot-policy not found, modules won't be signed

Building module:
Cleaning build area...
'make' KDIR=/lib/modules/6.5.0-10-generic/build...(bad exit status: 2)
ERROR (dkms apport): binary package for sgx: 1.41 not found
Error! Bad return status for module build on kernel: 6.5.0-10-generic (x86_64)
Consult /var/lib/dkms/sgx/1.41/build/make.log for more information.
dkms autoinstall on 6.5.0-10-generic/x86_64 failed for sgx(10)
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
 * dkms: autoinstall for kernel 6.5.0-10-generic
   ...fail!
run-parts: /etc/kernel/header_postinst.d/dkms exited with return code 11
dpkg: error processing package linux-headers-6.5.0-10-generic (--configure):
 installed linux-headers-6.5.0-10-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.5.0-10-generic; however:
  Package linux-headers-6.5.0-10-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.5.0.10.12); 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.
                                                                                                          No apport report written because the error message indicates its a followup error from a previous failure.
          Processing triggers for linux-image-6.5.0-10-generic (6.5.0-10.10) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 6.5.0-10-generic
Sign command: /usr/bin/kmodsign
Binary update-secureboot-policy not found, modules won't be signed

Building module:
Cleaning build area...
'make' KDIR=/lib/modules/6.5.0-10-generic/build...(bad exit status: 2)
ERROR (dkms apport): binary package for sgx: 1.41 not found
Error! Bad return status for module build on kernel: 6.5.0-10-generic (x86_64)
Consult /var/lib/dkms/sgx/1.41/build/make.log for more information.
dkms autoinstall on 6.5.0-10-generic/x86_64 failed for sgx(10)
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.
 * dkms: autoinstall for kernel 6.5.0-10-generic
   ...fail!
run-parts: /etc/kernel/postinst.d/dkms exited with return code 11
dpkg: error processing package linux-image-6.5.0-10-generic (--configure):
 installed linux-image-6.5.0-10-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.5.0-10-generic
 linux-headers-generic
 linux-generic
 linux-image-6.5.0-10-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done

任何建议都将不胜感激。谢谢。

答案1

请运行终端命令:

sudo dkms status

一个或者可能唯一的条目将是这样的:

sgx/1.41, 6.5.0-10-generic, x86_64: installed

删除它但是如果需要的话用您找到的确切版本和名称替换:

sudo dkms remove sgx/1.41 -–all

命令完成且无错误后,执行以下操作:

sudo apt update
sudo apt upgrade

发布任何错误或警告。

相关内容