linux - 安装 acpi-call-dkms 时出现此错误
问题描述
$ sudo apt install acpi-call-dkms
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
acpi-call-dkms
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/13.6 kB of archives.
After this operation, 48.1 kB of additional disk space will be used.
Selecting previously unselected package acpi-call-dkms.
(Reading database ... 395855 files and directories currently installed.)
Preparing to unpack .../acpi-call-dkms_1.1.0-5_all.deb ...
Unpacking acpi-call-dkms (1.1.0-5) ...
Setting up acpi-call-dkms (1.1.0-5) ...
Loading new acpi-call-1.1.0 DKMS files...
Building for 5.6.0-trunk-amd64
Building initial module for 5.6.0-trunk-amd64
Error! Bad return status for module build on kernel: 5.6.0-trunk-amd64 (x86_64)
Consult /var/lib/dkms/acpi-call/1.1.0/build/make.log for more information.
dpkg: error processing package acpi-call-dkms (--configure):
installed acpi-call-dkms package post-installation script subprocess returned error exit status 10
Errors were encountered while processing:
acpi-call-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
这些是 /var/lib/dkms/acpi-call/1.1.0/build/make.log 的内容
DKMS make.log for acpi-call-1.1.0 for kernel 5.6.0-trunk-amd64 (x86_64)
Thu 28 May 2020 06:26:56 PM IST
make: Entering directory '/usr/src/linux-headers-5.6.0-trunk-amd64'
AR /var/lib/dkms/acpi-call/1.1.0/build/built-in.a
CC [M] /var/lib/dkms/acpi-call/1.1.0/build/acpi_call.o
/var/lib/dkms/acpi-call/1.1.0/build/acpi_call.c: In function ‘init_acpi_call’:
/var/lib/dkms/acpi-call/1.1.0/build/acpi_call.c:356:53: error: passing argument 4 of ‘proc_create’ from incompatible pointer type [-Werror=incompatible-pointer-types]
&proc_acpi_operations);
^~~~~~~~~~~~~~~~~~~~~
In file included from /var/lib/dkms/acpi-call/1.1.0/build/acpi_call.c:6:
/usr/src/linux-headers-5.6.0-trunk-common/include/linux/proc_fs.h:64:24: note: expected ‘const struct proc_ops *’ but argument is of type ‘struct file_operations *’
struct proc_dir_entry *proc_create(const char *name, umode_t mode, struct proc_dir_entry *parent, const struct proc_ops *proc_ops);
^~~~~~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [/usr/src/linux-headers-5.6.0-trunk-common/scripts/Makefile.build:273: /var/lib/dkms/acpi-call/1.1.0/build/acpi_call.o] Error 1
make[1]: *** [/usr/src/linux-headers-5.6.0-trunk-common/Makefile:1696: /var/lib/dkms/acpi-call/1.1.0/build] Error 2
make: *** [/usr/src/linux-headers-5.6.0-trunk-common/Makefile:180: sub-make] Error 2
make: Leaving directory '/usr/src/linux-headers-5.6.0-trunk-amd64'
我使用 Thinkpad X1 Extreme。我尝试安装此软件包/软件以使用 TLP 设置电池阈值。感谢您的帮助!
解决方案
内核≥ 5.6 至少需要包含必要补丁的软件包版本 1.1.0-6(Debian 不稳定或 Ubuntu 20.10)。
https://linrunner.de/tlp/faq/battery.html#installation-of-package-acpi-call-dkms-failed
推荐阅读
- bazel - 如何找到由 bazel 目标生成的可执行文件
- node.js - 我需要创建一个网页并创建一个名为重要或否的复选框
- django - ModuleNotFoundError:没有名为“__main__.models”的模块;从数据库导入模型时,'__main__' 不是包
- php - PHP SameSite 会话问题,会话不起作用
- google-apps-script - 您可以使用 Google Script 在特定时间为未来日期创建日历事件吗?
- java - Spring Boot Security OAuth2 自定义异常消息
- ios - 推送通知不起作用 Xcode 11.3.1
- c - 包含状态机的文档 C 代码
- angular - 使用 ngx-bootstrap 时 Angular 9 抛出错误
- python - 尝试预测简单的二维输入时,Tensorflow 返回错误