如何安装 Realtek 无线 USB 适配器的驱动程序(在 Debian Buster 操作系统上)?

如何安装 Realtek 无线 USB 适配器的驱动程序(在 Debian Buster 操作系统上)?

我从亚马逊购买了 Realtek ac1200 无线 USB 3 适配器,目前正在尝试在我的计算机上进行设置。我的计算机以前是 Windows XP(但我将其转换为 Debian Buster 操作系统)。 USB 适配器附带驱动程序安装程序迷你光盘,其中包含 Linux、Mac 和 Windows 安装文件夹。我将 Linux 文件夹复制到桌面,其中有两个子文件夹:RTL8811CU_WiFi_linux 和 RTL8812BU_WiFi_linux。我不知道应该使用哪一个,但尽管如此,我尝试分别运行每个文件夹中的 install.sh 。令我沮丧的是,当我运行时,两者都出现编译错误(特别是 install.sh 尝试运行的 C 头文件显示警告和错误)。由于我无法让适配器附带的实际 install.sh 工作,我在互联网上搜索,试图找到是否可以在其他地方下载驱动程序,但我无法让它们中的任何一个工作。有谁知道如何为我的 USB 适配器安装适当的驱动程序,以便我的计算机可以使用该适配器?

运行install.sh时出现的错误如下:

make[1]: Entering directory '/usr/src/linux-headers-4.19.0-9-686-pae'


CC [M]  /home/caleb/Desktop/Linux/RTL8811CU_WiFi_linux/RTL8811CU_WiFi_linux/driver/rtl8821CU_WiFi_linux_v5.2.5.3_24795.20171031_COEX20170310-1212/core/rtw_cmd.o
In file included from /home/caleb/Desktop/Linux/RTL8811CU_WiFi_linux/RTL8811CU_WiFi_linux/driver/rtl8821CU_WiFi_linux_v5.2.5.3_24795.20171031_COEX20170310-1212/include/osdep_service.h:47,
                 from /home/caleb/Desktop/Linux/RTL8811CU_WiFi_linux/RTL8811CU_WiFi_linux/driver/rtl8821CU_WiFi_linux_v5.2.5.3_24795.20171031_COEX20170310-1212/include/drv_types.h:32,
                 from /home/caleb/Desktop/Linux/RTL8811CU_WiFi_linux/RTL8811CU_WiFi_linux/driver/rtl8821CU_WiFi_linux_v5.2.5.3_24795.20171031_COEX20170310-1212/core/rtw_cmd.c:22:
/home/caleb/Desktop/Linux/RTL8811CU_WiFi_linux/RTL8811CU_WiFi_linux/driver/rtl8821CU_WiFi_linux_v5.2.5.3_24795.20171031_COEX20170310-1212/include/osdep_service_linux.h: In function ‘_init_timer’:
/home/caleb/Desktop/Linux/RTL8811CU_WiFi_linux/RTL8811CU_WiFi_linux/driver/rtl8821CU_WiFi_linux_v5.2.5.3_24795.20171031_COEX20170310-1212/include/osdep_service_linux.h:295:8: error: ‘_timer’ {aka ‘struct timer_list’} has no member named ‘data’
  ptimer->data = (unsigned long)cntx;
        ^~
/home/caleb/Desktop/Linux/RTL8811CU_WiFi_linux/RTL8811CU_WiFi_linux/driver/rtl8821CU_WiFi_linux_v5.2.5.3_24795.20171031_COEX20170310-1212/include/osdep_service_linux.h:296:2: error: implicit declaration of function ‘init_timer’; did you mean ‘_init_timer’? [-Werror=implicit-function-declaration]
  init_timer(ptimer);
  ^~~~~~~~~~
  _init_timer
In file included from /home/caleb/Desktop/Linux/RTL8811CU_WiFi_linux/RTL8811CU_WiFi_linux/driver/rtl8821CU_WiFi_linux_v5.2.5.3_24795.20171031_COEX20170310-1212/include/drv_types.h:35,
                 from /home/caleb/Desktop/Linux/RTL8811CU_WiFi_linux/RTL8811CU_WiFi_linux/driver/rtl8821CU_WiFi_linux_v5.2.5.3_24795.20171031_COEX20170310-1212/core/rtw_cmd.c:22:
/home/caleb/Desktop/Linux/RTL8811CU_WiFi_linux/RTL8811CU_WiFi_linux/driver/rtl8821CU_WiFi_linux_v5.2.5.3_24795.20171031_COEX20170310-1212/include/wifi.h: At top level:
/home/caleb/Desktop/Linux/RTL8811CU_WiFi_linux/RTL8811CU_WiFi_linux/driver/rtl8821CU_WiFi_linux_v5.2.5.3_24795.20171031_COEX20170310-1212/include/wifi.h:1019: warning: "IEEE80211_MAX_AMPDU_BUF" redefined
 #define IEEE80211_MAX_AMPDU_BUF 0x40
 
In file included from /home/caleb/Desktop/Linux/RTL8811CU_WiFi_linux/RTL8811CU_WiFi_linux/driver/rtl8821CU_WiFi_linux_v5.2.5.3_24795.20171031_COEX20170310-1212/include/osdep_service_linux.h:86,
                 from /home/caleb/Desktop/Linux/RTL8811CU_WiFi_linux/RTL8811CU_WiFi_linux/driver/rtl8821CU_WiFi_linux_v5.2.5.3_24795.20171031_COEX20170310-1212/include/osdep_service.h:47,
                 from /home/caleb/Desktop/Linux/RTL8811CU_WiFi_linux/RTL8811CU_WiFi_linux/driver/rtl8821CU_WiFi_linux_v5.2.5.3_24795.20171031_COEX20170310-1212/include/drv_types.h:32,
                 from /home/caleb/Desktop/Linux/RTL8811CU_WiFi_linux/RTL8811CU_WiFi_linux/driver/rtl8821CU_WiFi_linux_v5.2.5.3_24795.20171031_COEX20170310-1212/core/rtw_cmd.c:22:
/usr/src/linux-headers-4.19.0-9-common/include/linux/ieee80211.h:1442: note: this is the location of the previous definition
 #define IEEE80211_MAX_AMPDU_BUF  0x100
 
cc1: some warnings being treated as errors
make[4]: *** [/usr/src/linux-headers-4.19.0-9-common/scripts/Makefile.build:309: /home/caleb/Desktop/Linux/RTL8811CU_WiFi_linux/RTL8811CU_WiFi_linux/driver/rtl8821CU_WiFi_linux_v5.2.5.3_24795.20171031_COEX20170310-1212/core/rtw_cmd.o] Error 1
make[3]: *** [/usr/src/linux-headers-4.19.0-9-common/Makefile:1537: _module_/home/caleb/Desktop/Linux/RTL8811CU_WiFi_linux/RTL8811CU_WiFi_linux/driver/rtl8821CU_WiFi_linux_v5.2.5.3_24795.20171031_COEX20170310-1212] Error 2
make[2]: *** [Makefile:146: sub-make] Error 2
make[1]: *** [Makefile:8: all] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.19.0-9-686-pae'
make: *** [Makefile:1893: modules] Error 2
##################################################
Compile make driver error: 2
Please check error Mesg
##################################################

答案1

谢谢至ajgringo6019征求他们的评论,链接为https://github.com/cilynx/rtl88x2bu!我克隆了 git hub 存储库,并按照其 github 页面上的“DKMS 安装”指南进行操作,效果非常好!

答案2

对上面的答案进行详细阐述。以下是存储库中有关如何运行“DKMS 安装”的代码

我可以确认这在我的设备上运行良好(180MBS 下载,280+ 上传)

  • 操作系统:Ubuntu 20.04 LTS
  • 内核:Linux 5.4.0-42-generic
  • 架构:x86-64
git clone https://github.com/cilynx/rtl88x2bu
cd rtl88x2bu/
VER=$(sed -n 's/\PACKAGE_VERSION="\(.*\)"/\1/p' dkms.conf)
sudo rsync -rvhP ./ /usr/src/rtl88x2bu-${VER}
sudo dkms add -m rtl88x2bu -v ${VER}
sudo dkms build -m rtl88x2bu -v ${VER}
sudo dkms install -m rtl88x2bu -v ${VER}
sudo modprobe 88x2bu

相关内容