![未找到 wifi 适配器 22.04](https://linux22.com/image/1198385/%E6%9C%AA%E6%89%BE%E5%88%B0%20wifi%20%E9%80%82%E9%85%8D%E5%99%A8%2022.04.png)
我买了一台新笔记本电脑,但找不到 wifi 适配器,因此做了一些研究并找到了解决方案。现在您已经通过网络共享成功安装了先决条件,让我们安装驱动程序。这一切都可以从终端完成!
git clone https://github.com/lwfinger/rtw89.git
cd rtw89
make
sudo make install
sudo modprobe rtw89pci
你的无线网络现在应该可以正常工作了。
但是运行 make 和 sudo make install 后出现错误
make -C /lib/modules/5.15.0-43-generic/build M=/home/hexa-l27/rtw89 modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-43-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
You are using: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
CC [M] /home/hexa-l27/rtw89/core.o
In file included from /home/hexa-l27/rtw89/core.c:13:
/home/hexa-l27/rtw89/fw.h:3214:17: error: expected specifier-qualifier-list before ‘DECLARE_FLEX_ARRAY’
3214 | DECLARE_FLEX_ARRAY(u8, raw);
| ^~~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:285: /home/hexa-l27/rtw89/core.o] Error 1
make[1]: *** [Makefile:1875: /home/hexa-l27/rtw89] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-43-generic'
make: *** [Makefile:84: all] Error 2
:~/rtw89$ sudo make install
make -C /lib/modules/5.15.0-43-generic/build M=/home/hexa-l27/rtw89 modules
make[1]: Entering directory '/usr/src/linux-headers-5.15.0-43-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0
You are using: gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
CC [M] /home/hexa-l27/rtw89/core.o
In file included from /home/hexa-l27/rtw89/core.c:13:
/home/hexa-l27/rtw89/fw.h:3214:17: error: expected specifier-qualifier-list before ‘DECLARE_FLEX_ARRAY’
3214 | DECLARE_FLEX_ARRAY(u8, raw);
| ^~~~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:285: /home/hexa-l27/rtw89/core.o] Error 1
make[1]: *** [Makefile:1875: /home/hexa-l27/rtw89] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.15.0-43-generic'
make: *** [Makefile:84: all] Error 2
谢谢