Ubuntu安装新的无线网卡驱动rtl88x2bu出现问题

Ubuntu安装新的无线网卡驱动出现问题

驱动名称:RTL88x2bu

在该驱动文件夹下执行./install.sh命令后出现如下错误:

Authentication requested [root] for make clean:
install.sh: 38: [: unexpected operator
#make -C /lib/modules/5.11.0-25-generic/build M=/home/driver/RTL88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/driver/rtl88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044 clean
cd hal ; rm -fr */*/*/*.mod.c */*/*/*.mod */*/*/*.o */*/*/.*.cmd */*/*/*.ko
cd hal ; rm -fr */*/*.mod.c */*/*.mod */*/*.o */*/.*.cmd */*/*.ko
cd hal ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko
cd hal ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd core/efuse ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd core ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd os_dep/linux ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd os_dep ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd platform ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
rm -fr .tmp_versions
Authentication requested [root] for make driver:
install.sh: 48: [: unexpected operator
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.11.0-25-generic/build M=/home/driver/RTL88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/driver/rtl88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044  modules
make[1]: 进入目录“/usr/src/linux-headers-5.11.0-25-generic”
  CC [M]  /home/driver/RTL88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/driver/rtl88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/core/rtw_cmd.o
In file included from /home/driver/RTL88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/driver/rtl88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/include/osdep_service.h:42,
                 from /home/driver/RTL88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/driver/rtl88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/include/drv_types.h:27,
                 from /home/driver/RTL88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/driver/rtl88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/core/rtw_cmd.c:17:
/home/driver/RTL88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/driver/rtl88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/include/osdep_service_linux.h: In function ‘_init_timer’:
/home/driver/RTL88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/driver/rtl88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/include/osdep_service_linux.h:282:8: error: ‘_timer’ {aka ‘struct timer_list’} has no member named ‘data’
  282 |  ptimer->data = (unsigned long)cntx;
      |        ^~
/home/driver/RTL88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/driver/rtl88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/include/osdep_service_linux.h:283:2: error: implicit declaration of function ‘init_timer’; did you mean ‘_init_timer’? [-Werror=implicit-function-declaration]
  283 |  init_timer(ptimer);
      |  ^~~~~~~~~~
      |  _init_timer
In file included from /home/driver/RTL88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/driver/rtl88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/include/drv_types.h:30,
                 from /home/driver/RTL88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/driver/rtl88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/core/rtw_cmd.c:17:
/home/driver/RTL88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/driver/rtl88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/include/wifi.h: At top level:
/home/driver/RTL88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/driver/rtl88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/include/wifi.h:1014: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
 1014 | #define IEEE80211_MAX_AMPDU_BUF 0x40
      | 
In file included from /home/driver/RTL88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/driver/rtl88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/include/osdep_service_linux.h:83,
                 from /home/driver/RTL88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/driver/rtl88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/include/osdep_service.h:42,
                 from /home/driver/RTL88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/driver/rtl88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/include/drv_types.h:27,
                 from /home/driver/RTL88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/driver/rtl88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/core/rtw_cmd.c:17:
./include/linux/ieee80211.h:1657: note: this is the location of the previous definition
 1657 | #define IEEE80211_MAX_AMPDU_BUF  0x100
      | 
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:287:/home/driver/RTL88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/driver/rtl88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/core/rtw_cmd.o] 错误 1
make[1]: *** [Makefile:1848:/home/driver/RTL88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044/driver/rtl88x2BU_WiFi_linux_v5.2.4.4_25643.20171212_COEX20171012-5044] 错误 2
make[1]: 离开目录“/usr/src/linux-headers-5.11.0-25-generic”
make: *** [Makefile:1794:modules] 错误 2
##################################################
Compile make driver error: 2
Please check error Mesg
##################################################

解决办法

先卸载旧的网卡驱动,执行lsmod命令查看当前系统装了哪些驱动,在里面找到要删除的驱动,执行modprobe 驱动名modprobe cfg11命令。
然后在github上搜索rtl88x2bu,下载下来并解压到某个目录下,再改目录下打开终端,执行deploy.sh,dkms就会帮我们装好。没有装dkms的先装一个。

评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值