博主环境
linc@pop-os:~$ uname -aLinux pop-os 5.8.0-7630-generic #32~1607010078~20.04~383a644-Ubuntu SMP Thu Dec 3 19:14:47 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
主要make报错信息
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.8.0-26-generic/build M=/home/user/Downloads/rtl88x2bu modulesmake[1]: Verzeichnis „/usr/src/linux-headers-5.8.0-26-generic“ wird betretenCC [M] /home/user/Downloads/rtl88x2bu/core/rtw_cmd.oIn file included from /home/user/Downloads/rtl88x2bu/include/drv_types.h:79,from /home/user/Downloads/rtl88x2bu/core/rtw_cmd.c:17:/home/user/Downloads/rtl88x2bu/include/rtw_security.h:252:8: error: redefinition of ‘struct sha256_state’252 | struct sha256_state {| ^~~~~~~~~~~~In file included from ./include/linux/filter.h:23,from ./include/net/sock.h:59,from ./include/linux/tcp.h:19,from ./include/linux/ipv6.h:88,from ./include/net/addrconf.h:50,from /home/user/Downloads/rtl88x2bu/include/osdep_service_linux.h:48,from /home/user/Downloads/rtl88x2bu/include/osdep_service.h:50,from /home/user/Downloads/rtl88x2bu/include/drv_types.h:27,from /home/user/Downloads/rtl88x2bu/core/rtw_cmd.c:17:./include/crypto/sha.h:84:8: note: originally defined here84 | struct sha256_state {| ^~~~~~~~~~~~make[2]: *** [scripts/Makefile.build:290: /home/user/Downloads/rtl88x2bu/core/rtw_cmd.o] Fehler 1make[1]: *** [Makefile:1780: /home/user/Downloads/rtl88x2bu] Fehler 2make[1]: Verzeichnis „/usr/src/linux-headers-5.8.0-26-generic“ wird verlassenmake: *** [Makefile:2284: modules] Fehler 2
首先确保原来的驱动已经删除
sudo dkms remove rtl88x2bu/5.6.1sudo dkms status
然后开始重新编译
sudo git clone "/RinCat/RTL88x2BU-Linux-Driver.git" /usr/src/rtl88x2bu-gitsudo sed -i 's/PACKAGE_VERSION="@PKGVER@"/PACKAGE_VERSION="git"/g' /usr/src/rtl88x2bu-git/dkms.confsudo dkms add -m rtl88x2bu -v gitsudo dkms autoinstall
重启设备
重启设备之后就可以正常使用了,理论上只要内核更新出现问题都可以用这个解决
可以看到截图中已经有2个网卡设备在线了