AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1234249
Accepted
Cactus
Cactus
Asked: 2020-05-03 02:31:28 +0800 CST2020-05-03 02:31:28 +0800 CST 2020-05-03 02:31:28 +0800 CST

所有 DKMS 管理的模块都因“执行格式错误”而失败

  • 772

在我的 Ubuntu 18.04 机器上加载期间,所有 DKMS 管理的内核模块都开始失败。我注意到了它,acpi_call所以让我用它来演示:

# uname -r
4.15.0-99-generic

# modinfo acpi_call.ko 
filename:       /lib/modules/4.15.0-99-generic/updates/dkms/acpi_call.ko
license:        GPL
srcversion:     72B6FB9451F0D2139482F11
depends:        
retpoline:      Y
name:           acpi_call
vermagic:       4.15.0-99-generic SMP mod_unload 
signat:         PKCS#7
signer:         
sig_key:        
sig_hashalgo:   md4

# modprobe acpi_call
modprobe: ERROR: could not insert 'acpi_call': Exec format error

我尝试使用 DKMS 重新安装它,但无济于事:

# dkms status acpi-call
acpi-call, 1.1.0, 4.15.0-99-generic, x86_64: installed

# dkms remove acpi-call/1.1.0 --all

-------- Uninstall Beginning --------
Module:  acpi-call
Version: 1.1.0
Kernel:  4.15.0-99-generic (x86_64)
-------------------------------------

Status: Before uninstall, this module version was ACTIVE on this kernel.

acpi_call.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.15.0-99-generic/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...

DKMS: uninstall completed.

------------------------------
Deleting module version: 1.1.0
completely from the DKMS tree.
------------------------------
Done.

# dkms install acpi-call/1.1.0

Creating symlink /var/lib/dkms/acpi-call/1.1.0/source ->
                 /usr/src/acpi-call-1.1.0

DKMS: add completed.

Kernel preparation unnecessary for this kernel.  Skipping...

Building module:
cleaning build area...
make -j8 KERNELRELEASE=4.15.0-99-generic -C /lib/modules/4.15.0-99-generic/build M=/var/lib/dkms/acpi-call/1.1.0/build...
Signing module:
 - /var/lib/dkms/acpi-call/1.1.0/4.15.0-99-generic/x86_64/module/acpi_call.ko
Nothing to do.
cleaning build area...

DKMS: build completed.

acpi_call.ko:
Running module version sanity check.
 - Original module
   - No original module exists within this kernel
 - Installation
   - Installing to /lib/modules/4.15.0-99-generic/updates/dkms/

depmod...

DKMS: install completed.

# modprobe acpi_call
modprobe: ERROR: could not insert 'acpi_call': Exec format error

中的其他模块/lib/modules/4.15.0-99-generic/updates/dkms表现出完全相同的问题。

我也试过modprobe -f,导致不同的错误信息:

# modprobe -f acpi_call
modprobe: ERROR: could not insert 'acpi_call': Required key not available

这使我陷入了MOK 兔子洞,但即使在注册了新的 MOK 并sign-file-ing.ko文件之后,我仍然收到Required key not available错误消息。如果我禁用验证,那么modprobe -f仍然会失败并显示Exec format error.

另外,我注意到这一行dmesg:

[  617.320431] module: x86/modules: Skipping invalid relocation target, existing value is nonzero for type 1, loc 0000000057734886, val ffffffffc0d56a43

这里出了什么问题,我该如何解决?

kernel 18.04 dkms
  • 1 1 个回答
  • 2443 Views

1 个回答

  • Voted
  1. Best Answer
    Cactus
    2020-05-03T03:41:31+08:002020-05-03T03:41:31+08:00

    事实证明,问题在于我系统上的默认 GCC 已更改为 GCC-9(由于freehdl升级失败,但无论如何)。与用于构建 Ubuntu 内核的 GCC 版本相比,这导致了用于使用 DKMS 构建模块的 GCC 版本不同(并且显然与 ABI 不兼容?)。

    降级回 GCC-7(并重建所有 DKMS 模块)后,现在一切都像以前一样工作,包括安全启动支持。

    • 3

相关问题

  • 为 i7 处理器编译内核的最佳方法是什么?

  • 未连接到任何可见进程的令人讨厌的 CPU 峰值

  • 如何让我的电脑中的风扇在暂停时关闭?[关闭]

  • Ubuntu 是否支持与 SSD 一起使用的 TRIM 命令?

  • 使用 apt-get upgrade 时如何强制安装内核更新?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve