安装WIFI驱动错误

安装WIFI驱动错误

我有 Tenda W311MI 无线纳米 USB 适配器。在 Windows 上它会自动安装并运行。在 Ubuntu 上没有可用的 wifi 网络。我从 Tenda 网站下载了驱动程序https://down.tendacn.com/uploadfile/201401/driver/RT5572_LinuxSTA_2.6.1.3_20121022.rar。我不懂 C,也不擅长 CLI。我找到了这个安装驱动程序的指南https://titanwolf.org/Network/Articles/Article?AID=247af549-250e-4ba1-8098-e3a98133fef8。首先,我遇到了一个错误:解决方案是将父文件夹重命名为简单名称。其次,我遇到了另一个错误:解决方案是全部替换sudo make“SUBDIRS=” 改为“M=”。我按照指南中的步骤操作,最后在驱动程序文件夹的根目录下运行时出现此错误:

make -C tools
make[1]: Entering directory '/home/hammad/Downloads/v3/dpo/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory '/home/hammad/Downloads/v3/dpo/tools'
/home/hammad/Downloads/v3/dpo/tools/bin2h
cp -f os/linux/Makefile.6 /home/hammad/Downloads/v3/dpo/os/linux/Makefile
make -C /lib/modules/5.11.0-44-generic/build M=/home/hammad/Downloads/v3/dpo/os/linux modules
make[1]: Entering directory '/usr/src/linux-headers-5.11.0-44-generic'
  CC [M]  /home/hammad/Downloads/v3/dpo/os/linux/../../sta/sync.o
/home/hammad/Downloads/v3/dpo/os/linux/../../sta/sync.c: In function ‘PeerBeacon’:
/home/hammad/Downloads/v3/dpo/os/linux/../../sta/sync.c:2180:12: error: passing argument 8 of ‘StaAddMacTableEntry’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 2180 |            ie_list,
      |            ^~~~~~~
      |            |
      |            BCN_IE_LIST * {aka struct _bcn_ie_list *}
In file included from /home/hammad/Downloads/v3/dpo/include/rt_config.h:59,
                 from /home/hammad/Downloads/v3/dpo/os/linux/../../sta/sync.c:28:
/home/hammad/Downloads/v3/dpo/include/rtmp.h:7900:15: note: expected ‘IE_LISTS *’ {aka ‘struct _IE_lists *’} but argument is of type ‘BCN_IE_LIST *’ {aka ‘struct _bcn_ie_list *’}
 7900 |  IN IE_LISTS *ie_list,
      |     ~~~~~~~~~~^~~~~~~
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:288: /home/hammad/Downloads/v3/dpo/os/linux/../../sta/sync.o] Error 1
make[1]: *** [Makefile:1849: /home/hammad/Downloads/v3/dpo/os/linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.11.0-44-generic'
make: *** [Makefile:395: LINUX] Error 2

有人在另一篇帖子中回答了类似的错误,并给出了安装 gcc-4.8 的解决方案。我无法安装它。我下载了压缩文件。解压它。按照指南进行构建,但最后一步导致错误。

我也尝试应用此解决方案:安装ndiswrapperndisgtk但无法遵循最后几个步骤。

感谢您的阅读。

编辑

$ lsusb
Bus 002 Device 010: ID 0bb4:0ffe HTC (High Tech Computer Corp.) Desire HD (modem mode)
Bus 002 Device 008: ID 0bda:b711 Realtek Semiconductor Corp. RTL8188GU 802.11n WLAN Adapter (After Modeswitch)
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 008 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 005 Device 002: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

答案1

要安装正确的驱动程序,请在终端中运行以下命令(确保在运行命令时有有效的互联网连接):

sudo apt-get install build-essential git dkms linux-headers-$(uname -r)
git clone https://github.com/McMCCRU/rtl8188gu.git
cd rtl8188gu
make
sudo make install
sudo apt install --reinstall linux-firmware 
sudo reboot

就是这样!

看一眼https://github.com/McMCCRU/rtl8188gu

相关内容