在 Ubuntu 18.04.4 上安装双频 USB 适配器 2.4/5GHz Wi-Fi 时出现问题

在 Ubuntu 18.04.4 上安装双频 USB 适配器 2.4/5GHz Wi-Fi 时出现问题

双频 USB 适配器 2.4/5GHz 1200(866+300)Mbps 无线速度,支持 802.11ac

所以最近我购买了双频 USB 适配器,其驱动程序位于 CD 上,可安装在 Windows、Mac 和 Linux 上。

我在用着Ubuntu 18.04.4 LTS64位

1. 将适配器连接到 USB 端口后,我在终端中检查了端口输入lsusb,得到了以下信息:

Bus 001 Device 007: ID 0bda:b812 Realtek Semiconductor Corp.

2. sudo dkms status从此以后我就什么也没有了。

3. 然后我去安装 Wi-Fi 2.4GHz,位于名为 (RTL81888192EUS_linux_v4.3.0.4_11485.20140519) 在 CD 中,在终端中输入chmod +x install.sh,然后sudo ./install.sh我得到了以下结果:

##################################################
Realtek Wi-Fi driver Auto installation script
Novembor, 21 2011 v1.1.0
##################################################
Decompress the driver source tar ball:
    rtl8188EUS_linux_v4.3.0.4_11485.20140519.tar.gz
rtl8188EUS_linux_v4.3.0.4_11485.20140519/ (all files)

Authentication requested [root] for make clean:
cd hal/OUTSRC/ ; rm -fr */*.mod.c */*.mod */*.o */.*.cmd */*.ko
cd hal/OUTSRC/ ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko 
cd hal/led ; 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:
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.15.0-101-generic/build M=/home/luisito/Documents/RTL81888192EUS_linux_v4.3.0.4_11485.20140519/driver/rtl8188EUS_linux_v4.3.0.4_11485.20140519  modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-101-generic'
CC [M]  /home/luisito/Documents/RTL81888192EUS_linux_v4.3.0.4_11485.20140519/driver/rtl8188EUS_linux_v4.3.0.4_11485.20140519/core/rtw_cmd.o
In file included from /home/luisito/Documents/RTL81888192EUS_linux_v4.3.0.4_11485.20140519/driver/rtl8188EUS_linux_v4.3.0.4_11485.20140519/include/osdep_service.h:41:0,
                 from /home/luisito/Documents/RTL81888192EUS_linux_v4.3.0.4_11485.20140519/driver/rtl8188EUS_linux_v4.3.0.4_11485.20140519/include/drv_types.h:32,
                 from /home/luisito/Documents/RTL81888192EUS_linux_v4.3.0.4_11485.20140519/driver/rtl8188EUS_linux_v4.3.0.4_11485.20140519/core/rtw_cmd.c:22:
/home/luisito/Documents/RTL81888192EUS_linux_v4.3.0.4_11485.20140519/driver/rtl8188EUS_linux_v4.3.0.4_11485.20140519/include/osdep_service_linux.h: In function ‘_init_timer’:
/home/luisito/Documents/RTL81888192EUS_linux_v4.3.0.4_11485.20140519/driver/rtl8188EUS_linux_v4.3.0.4_11485.20140519/include/osdep_service_linux.h:253:8: error: ‘_timer {aka struct timer_list}’ has no member named ‘data’
  ptimer->data = (unsigned long)cntx;
        ^~
/home/luisito/Documents/RTL81888192EUS_linux_v4.3.0.4_11485.20140519/driver/rtl8188EUS_linux_v4.3.0.4_11485.20140519/include/osdep_service_linux.h:254: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/luisito/Documents/RTL81888192EUS_linux_v4.3.0.4_11485.20140519/driver/rtl8188EUS_linux_v4.3.0.4_11485.20140519/include/drv_types.h:32:0,
             from /home/luisito/Documents/RTL81888192EUS_linux_v4.3.0.4_11485.20140519/driver/rtl8188EUS_linux_v4.3.0.4_11485.20140519/core/rtw_cmd.c:22:
/home/luisito/Documents/RTL81888192EUS_linux_v4.3.0.4_11485.20140519/driver/rtl8188EUS_linux_v4.3.0.4_11485.20140519/include/osdep_service.h: In function ‘thread_enter’:
/home/luisito/Documents/RTL81888192EUS_linux_v4.3.0.4_11485.20140519/driver/rtl8188EUS_linux_v4.3.0.4_11485.20140519/include/osdep_service.h:342:2: error: implicit declaration of function ‘allow_signal’; did you mean ‘do_signal’? [-Werror=implicit-function-declaration]
  allow_signal(SIGTERM);
  ^~~~~~~~~~~~
  do_signal
/home/luisito/Documents/RTL81888192EUS_linux_v4.3.0.4_11485.20140519/driver/rtl8188EUS_linux_v4.3.0.4_11485.20140519/include/osdep_service.h: In function ‘flush_signals_thread’:
/home/luisito/Documents/RTL81888192EUS_linux_v4.3.0.4_11485.20140519/driver/rtl8188EUS_linux_v4.3.0.4_11485.20140519/include/osdep_service.h:352:6: error: implicit declaration of function ‘signal_pending’; did you mean ‘timer_pending’? [-Werror=implicit-function-declaration]
  if (signal_pending (current))
      ^~~~~~~~~~~~~~
      timer_pending
/home/luisito/Documents/RTL81888192EUS_linux_v4.3.0.4_11485.20140519/driver/rtl8188EUS_linux_v4.3.0.4_11485.20140519/include/osdep_service.h:354:3: error: implicit declaration of function ‘flush_signals’; did you mean ‘do_signal’? [-Werror=implicit-function-declaration]
   flush_signals(current);
   ^~~~~~~~~~~~~
   do_signal
cc1: some warnings being treated as errors
scripts/Makefile.build:330: recipe for target '/home/luisito/Documents/RTL81888192EUS_linux_v4.3.0.4_11485.20140519/driver/rtl8188EUS_linux_v4.3.0.4_11485.20140519/core/rtw_cmd.o' failed
make[2]: *** [/home/luisito/Documents/RTL81888192EUS_linux_v4.3.0.4_11485.20140519/driver/rtl8188EUS_linux_v4.3.0.4_11485.20140519/core/rtw_cmd.o] Error 1
Makefile:1577: recipe for target '_module_/home/luisito/Documents/RTL81888192EUS_linux_v4.3.0.4_11485.20140519/driver/rtl8188EUS_linux_v4.3.0.4_11485.20140519' failed
make[1]: *** [_module_/home/luisito/Documents/RTL81888192EUS_linux_v4.3.0.4_11485.20140519/driver/rtl8188EUS_linux_v4.3.0.4_11485.20140519] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-101-generic'
Makefile:1318: recipe for target 'modules' failed
make: *** [modules] Error 2
##################################################
Compile make driver error: 2
Please check error Mesg
##################################################

该文件似乎rtw_cmd.o文件夹中不存在,因此失败。

4. 最后,我去名为 (RTL8821AU_Linux_v5.2.6_21981_COEX20170206-6760.20170407) 在 CD 中,在终端中输入chmod +x install.sh,然后sudo ./install.sh我得到了以下结果:

##################################################
Realtek Wi-Fi driver Auto installation script
Novembor, 21 2011 v1.1.0
##################################################
Decompress the driver source tar ball:
    rtl8821AU_WiFi_linux_v5.2.6_21981.20170407_COEX20170206-6760.tar.gz
rtl8821AU_WiFi_linux_v5.2.6_21981.20170407_COEX20170206-6760/ (all files)

Authentication requested [root] for make clean:
#make -C /lib/modules/4.15.0-101-generic/build M=/home/luisito/Documents/RTL8821AU_Linux_v5.2.6_21981_COEX20170206-6760.20170407/driver/rtl8821AU_WiFi_linux_v5.2.6_21981.20170407_COEX20170206-6760 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:
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.15.0-101-generic/build M=/home/luisito/Documents/RTL8821AU_Linux_v5.2.6_21981_COEX20170206-6760.20170407/driver/rtl8821AU_WiFi_linux_v5.2.6_21981.20170407_COEX20170206-6760  modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-101-generic'
  CC [M]  /home/luisito/Documents/RTL8821AU_Linux_v5.2.6_21981_COEX20170206-6760.20170407/driver/rtl8821AU_WiFi_linux_v5.2.6_21981.20170407_COEX20170206-6760/core/rtw_cmd.o
In file included from /home/luisito/Documents/RTL8821AU_Linux_v5.2.6_21981_COEX20170206-6760.20170407/driver/rtl8821AU_WiFi_linux_v5.2.6_21981.20170407_COEX20170206-6760/include/osdep_service.h:47:0,
                 from /home/luisito/Documents/RTL8821AU_Linux_v5.2.6_21981_COEX20170206-6760.20170407/driver/rtl8821AU_WiFi_linux_v5.2.6_21981.20170407_COEX20170206-6760/include/drv_types.h:32,
                 from /home/luisito/Documents/RTL8821AU_Linux_v5.2.6_21981_COEX20170206-6760.20170407/driver/rtl8821AU_WiFi_linux_v5.2.6_21981.20170407_COEX20170206-6760/core/rtw_cmd.c:22:
/home/luisito/Documents/RTL8821AU_Linux_v5.2.6_21981_COEX20170206-6760.20170407/driver/rtl8821AU_WiFi_linux_v5.2.6_21981.20170407_COEX20170206-6760/include/osdep_service_linux.h: In function ‘_init_timer’:
/home/luisito/Documents/RTL8821AU_Linux_v5.2.6_21981_COEX20170206-6760.20170407/driver/rtl8821AU_WiFi_linux_v5.2.6_21981.20170407_COEX20170206-6760/include/osdep_service_linux.h:288:8: error: ‘_timer {aka struct timer_list}’ has no member named ‘data’
  ptimer->data = (unsigned long)cntx;
        ^~
/home/luisito/Documents/RTL8821AU_Linux_v5.2.6_21981_COEX20170206-6760.20170407/driver/rtl8821AU_WiFi_linux_v5.2.6_21981.20170407_COEX20170206-6760/include/osdep_service_linux.h:289: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/luisito/Documents/RTL8821AU_Linux_v5.2.6_21981_COEX20170206-6760.20170407/driver/rtl8821AU_WiFi_linux_v5.2.6_21981.20170407_COEX20170206-6760/include/drv_types.h:32:0,
                 from /home/luisito/Documents/RTL8821AU_Linux_v5.2.6_21981_COEX20170206-6760.20170407/driver/rtl8821AU_WiFi_linux_v5.2.6_21981.20170407_COEX20170206-6760/core/rtw_cmd.c:22:
/home/luisito/Documents/RTL8821AU_Linux_v5.2.6_21981_COEX20170206-6760.20170407/driver/rtl8821AU_WiFi_linux_v5.2.6_21981.20170407_COEX20170206-6760/include/osdep_service.h: In function ‘thread_enter’:
/home/luisito/Documents/RTL8821AU_Linux_v5.2.6_21981_COEX20170206-6760.20170407/driver/rtl8821AU_WiFi_linux_v5.2.6_21981.20170407_COEX20170206-6760/include/osdep_service.h:375:2: error: implicit declaration of function ‘allow_signal’; did you mean ‘do_signal’? [-Werror=implicit-function-declaration]
  allow_signal(SIGTERM);
  ^~~~~~~~~~~~
  do_signal
/home/luisito/Documents/RTL8821AU_Linux_v5.2.6_21981_COEX20170206-6760.20170407/driver/rtl8821AU_WiFi_linux_v5.2.6_21981.20170407_COEX20170206-6760/include/osdep_service.h: In function ‘flush_signals_thread’:
/home/luisito/Documents/RTL8821AU_Linux_v5.2.6_21981_COEX20170206-6760.20170407/driver/rtl8821AU_WiFi_linux_v5.2.6_21981.20170407_COEX20170206-6760/include/osdep_service.h:385:6: error: implicit declaration of function ‘signal_pending’; did you mean ‘timer_pending’? [-Werror=implicit-function-declaration]
  if (signal_pending(current))
      ^~~~~~~~~~~~~~
      timer_pending
/home/luisito/Documents/RTL8821AU_Linux_v5.2.6_21981_COEX20170206-6760.20170407/driver/rtl8821AU_WiFi_linux_v5.2.6_21981.20170407_COEX20170206-6760/include/osdep_service.h:386:3: error: implicit declaration of function ‘flush_signals’; did you mean ‘do_signal’? [-Werror=implicit-function-declaration]
   flush_signals(current);
   ^~~~~~~~~~~~~
   do_signal
cc1: some warnings being treated as errors
scripts/Makefile.build:330: recipe for target '/home/luisito/Documents/RTL8821AU_Linux_v5.2.6_21981_COEX20170206-6760.20170407/driver/rtl8821AU_WiFi_linux_v5.2.6_21981.20170407_COEX20170206-6760/core/rtw_cmd.o' failed
make[2]: *** [/home/luisito/Documents/RTL8821AU_Linux_v5.2.6_21981_COEX20170206-6760.20170407/driver/rtl8821AU_WiFi_linux_v5.2.6_21981.20170407_COEX20170206-6760/core/rtw_cmd.o] Error 1
Makefile:1577: recipe for target '_module_/home/luisito/Documents/RTL8821AU_Linux_v5.2.6_21981_COEX20170206-6760.20170407/driver/rtl8821AU_WiFi_linux_v5.2.6_21981.20170407_COEX20170206-6760' failed
make[1]: *** [_module_/home/luisito/Documents/RTL8821AU_Linux_v5.2.6_21981_COEX20170206-6760.20170407/driver/rtl8821AU_WiFi_linux_v5.2.6_21981.20170407_COEX20170206-6760] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-101-generic'
Makefile:1877: recipe for target 'modules' failed
make: *** [modules] Error 2
##################################################
Compile make driver error: 2
Please check error Mesg
##################################################

该文件似乎rtw_cmd.o在该文件夹中不存在,因此也失败了。

- 那么有人可以修复文件吗rtw_cmd.o可以在 Wi-Fi 2.4GHz 和 5GHz 两个文件夹中吗?

文件夹位于以下链接中:适用于 Linux 的双频 USB 适配器 Wifi

答案1

首先,确保安装了必要的先决条件:

sudo apt update
sudo apt install --reinstall build-essential dkms git
git clone https://github.com/cilynx/rtl88x2bu.git
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

你的无线网络现在应该可以正常工作了。

相关内容