@kunyi 谢谢回复。很奇怪我们两个的内核版本都是一样的,我的用dkms方法安装之后,还是一样的报错
jyh@jyh:~$ sudo dkms status
[sudo] jyh 的密码:
awdev, 0.5, 5.15.0-107-generic, x86_64: installed (WARNING! Diff between built and installed module!)
awdev, 0.5.1, 5.15.0-107-generic, x86_64: built
nvidia, 535.183.01, 5.15.0-107-generic, x86_64: installed
jyh@jyh:~$ sudo dkms remove awdev/0.5 --all
-------- Uninstall Beginning --------
Module: awdev
Version: 0.5
Kernel: 5.15.0-107-generic (x86_64)
-------------------------------------
Status: Before uninstall, this module version was ACTIVE on this kernel.
awusb.ko:
- Uninstallation
- Deleting from: /lib/modules/5.15.0-107-generic/
rmdir: 删除 '' 失败: 没有那个文件或目录
- 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: 0.5
completely from the DKMS tree.
------------------------------
Done.
jyh@jyh:~$ sudo dkms status
awdev, 0.5.1, 5.15.0-107-generic, x86_64: built
nvidia, 535.183.01, 5.15.0-107-generic, x86_64: installed
jyh@jyh:~$ sudo dkms remove awdev/0.5.1 --all
-------- Uninstall Beginning --------
Module: awdev
Version: 0.5.1
Kernel: 5.15.0-107-generic (x86_64)
-------------------------------------
Status: This module version was INACTIVE for this kernel.
depmod...
DKMS: uninstall completed.
------------------------------
Deleting module version: 0.5.1
completely from the DKMS tree.
------------------------------
Done.
jyh@jyh:~$ ls /usr/src/ -l
总用量 28
drwxr-xr-x 5 root root 4096 6月 25 15:54 awdev-0.5
drwxr-xr-x 2 root root 4096 6月 25 13:52 awdev-0.5.1
drwxr-xr-x 7 root root 4096 6月 25 11:22 linux-headers-5.15.0-107-generic
drwxr-xr-x 2 root root 4096 2月 26 17:23 linux-headers-5.15.0-92-generic
drwxr-xr-x 2 root root 4096 3月 9 06:15 linux-headers-5.15.0-97-generic
drwxr-xr-x 25 root root 4096 6月 25 11:22 linux-hwe-5.15-headers-5.15.0-107
drwxr-xr-x 9 root root 4096 6月 25 11:51 nvidia-535.183.01
jyh@jyh:~$ sudo dkms add /usr/src/awdev-0.5/
Creating symlink /var/lib/dkms/awdev/0.5/source ->
/usr/src/awdev-0.5
DKMS: add completed.
jyh@jyh:~$ sudo dkms build awdev/0.5
Kernel preparation unnecessary for this kernel. Skipping...
Building module:
cleaning build area...
make -j20 KERNELRELEASE=5.15.0-107-generic default KERNELVERSION=5.15.0-107-generic...
Signing module:
- /var/lib/dkms/awdev/0.5/5.15.0-107-generic/x86_64/module/awusb.ko
Secure Boot not enabled on this system.
cleaning build area...
DKMS: build completed.
jyh@jyh:~$ sudo dkms install awdev/0.5
awusb.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/5.15.0-107-generic/updates/
depmod...
DKMS: install completed.
jyh@jyh:~$ sudo dkms status
awdev, 0.5, 5.15.0-107-generic, x86_64: installed
nvidia, 535.183.01, 5.15.0-107-generic, x86_64: installed
jyh@jyh:~$ sudo modprobe awusb
modprobe: ERROR: could not insert 'awusb': Exec format error
可以看一下你电脑上的headers是不是有这两个包吗,linux-headers-5.15.0-107-generic和linux-hwe-5.15-headers-5.15.0-107
jyh@jyh:~$ sudo dpkg -l|grep headers|grep linux
[sudo] jyh 的密码:
ii libselinux1-dev:amd64 3.0-1build2 amd64 SELinux development headers
ii linux-headers-5.15.0-107-generic 5.15.0-107.117~20.04.1 amd64 Linux kernel headers for version 5.15.0 on 64 bit x86 SMP
ii linux-hwe-5.15-headers-5.15.0-107 5.15.0-107.117~20.04.1 all Header files related to Linux kernel version 5.15.0