Fedora 37上acpi_call模块无法安装加载、卸载失败的问题求助
Fedora 37上acpi_call模块无法安装加载、卸载失败的问题求助
各位大佬好,我在Fedora 37 Workstation(内核版本6.0.7-301.fc37.x86_64)上折腾acpi_call模块时遇到了一堆麻烦,实在搞不定了来求助!具体情况如下:
初始状态:模块已安装但完全没加载
我下载并安装了acpi_call包,执行rpm -qa | grep acpi_call能看到:
acpi_call-1.1.0-1.noarch
rpm -ql acpi_call显示/usr/src/下的acpi_call文件都在,/var/lib/dkms/里也有对应的acpi_call文件夹,但模块根本没加载成功:
/proc/acpi/call文件不存在- 执行
lsmod | grep -q acpi_call完全没输出
尝试卸载却接连失败
用常规命令卸载时全报错:
1. dnf卸载失败
执行sudo dnf remove acpi_call后弹出一堆错误:
Error! The module/version combo: %{module}-1.1.0 is not located in the DKMS tree. error: %preun(acpi_call-1.1.0-1.noarch) scriptlet failed, exit status 3 error: acpi_call-1.1.0-1.noarch: erase failed Error! The module/version combo: %{module}-1.1.0 is not located in the DKMS tree. error: %preun(acpi_call-1.1.0-1.noarch) scriptlet failed, exit status 3 error: acpi_call-1.1.0-1.noarch: erase failed
2. rpm卸载也失败
先查了下发现居然装了两个相同版本的包:
❯ rpm -qa | grep acpi_call acpi_call-1.1.0-1.noarch acpi_call-1.1.0-1.noarch
执行sudo rpm -e --allmatches acpi_call还是报错:
Error! The module/version combo: %{module}-1.1.0 is not located in the DKMS tree. error: %preun(acpi_call-1.1.0-1.noarch) scriptlet failed, exit status 3 error: acpi_call-1.1.0-1.noarch: erase failed Error! The module/version combo: %{module}-1.1.0 is not located in the DKMS tree. error: %preun(acpi_call-1.1.0-1.noarch) scriptlet failed, exit status 3 error: acpi_call-1.1.0-1.noarch: erase failed
绕过脚本卸载后,重新安装还是失败
后来用sudo dnf --setopt=tsflags=noscripts remove acpi_call总算卸载成功了,rpm查询也找不到acpi_call了,但/var/lib/dkms/acpi_call/文件夹还留着,我手动删掉了它。
结果重新安装acpi_call时又栽了,模块编译直接失败:
Creating symlink /var/lib/dkms/acpi_call/1.1.0/source -> /usr/src/acpi_call-1.1.0 Sign command: /lib/modules/6.0.7-301.fc37.x86_64/build/scripts/sign-file Signing key: /var/lib/dkms/mok.key Public certificate (MOK): /var/lib/dkms/mok.pub Certificate or key are missing, generating self signed certificate for MOK... Key file /var/lib/dkms/mok.key not found and can't be generated, modules won't be signed Building module: Cleaning build area... make -j16 KERNELRELEASE=6.0.7-301.fc37.x86_64 -C /lib/modules/6.0.7-301.fc37.x86_64/build M=/var/lib/dkms/acpi_call/1.1.0/build...(bad exit status: 2) Error! Bad return status for module build on kernel: 6.0.7-301.fc37.x86_64 (x86_64) Consult /var/lib/dkms/acpi_call/1.1.0/build/make.log for more information. Sign command: /lib/modules/6.0.7-301.fc37.x86_64/build/scripts/sign-file Signing key: /var/lib/dkms/mok.key Public certificate (MOK): /var/lib/dkms/mok.pub Certificate or key are missing, generating self signed certificate for MOK... Key file /var/lib/dkms/mok.key not found and can't be generated, modules won't be signed Building module: Cleaning build area... make -j16 KERNELRELEASE=6.0.7-301.fc37.x86_64 -C /lib/modules/6.0.7-301.fc37.x86_64/build M=/var/lib/dkms/acpi_call/1.1.0/build...(bad exit status: 2) Error! Bad return status for module build on kernel: 6.0.7-301.fc37.x86_64 (x86_64) Consult /var/lib/dkms/acpi_call/1.1.0/build/make.log for more information. warning: %post(acpi_call-1.1.0-1.noarch) scriptlet failed, exit status 10
打开/var/lib/dkms/acpi_call/1.1.0/build/make.log一看,是代码编译时的类型不兼容错误:
DKMS make.log for acpi_call-1.1.0 for kernel 6.0.7-301.fc37.x86_64 (x86_64) Thu Feb 9 03:37:07 PM EET 2023 make: Entering directory '/usr/src/kernels/6.0.7-301.fc37.x86_64' 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:355:53: error: passing argument 4 of ‘proc_create’ from incompatible pointer type [-Werror=incompatible-pointer-types] 355 | &proc_acpi_operations); | ^~~~~~~~~~~~~~~~~~~~~ | | | struct file_operations * In file included from /var/lib/dkms/acpi_call/1.1.0/build/acpi_call.c:6: ./include/linux/proc_fs.h:110:122: note: expected ‘const struct proc_ops *’ but argument is of type ‘struct file_operations *’ 110 | 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[1]: *** [scripts/Makefile.build:249: /var/lib/dkms/acpi_call/1.1.0/build/acpi_call.o] Error 1 make: *** [Makefile:1856: /var/lib/dkms/acpi_call/1.1.0/build] Error 2 make: Leaving directory '/usr/src/kernels/6.0.7-301.fc37.x86_64'
现在完全不知道该怎么处理了,有没有懂的大佬给指条路?
备注:内容来源于stack exchange,提问作者metramarta
相关产品推荐
相关产品推荐

