无法在 Ubuntu 22.04 中安装 802.11b/g/n 无线 USB 适配器驱动程序

无法在 Ubuntu 22.04 中安装 802.11b/g/n 无线 USB 适配器驱动程序

几个月前,在我切换到 Ubuntu 之前,我在 Win10 中使用了相同的驱动程序,一段时间后我尝试在 Ubuntu 中安装它。

当我运行安装脚本时,快速启动后出现了这个兼容性问题:

sudo ./install.sh
[sudo] password for ubuntu: 
##################################################
Realtek Wi-Fi driver Auto installation script
Novembor, 21 2011 v1.1.0
##################################################
Decompress the driver source tar ball:
    rtl8188EUS_linux_v4.1.4_6773.20130222.tar.gz
rtl8188EUS_linux_v4.1.4_6773.20130222/
rtl8188EUS_linux_v4.1.4_6773.20130222/runwpa
rtl8188EUS_linux_v4.1.4_6773.20130222/core/
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_xmit.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_ioctl_query.c
rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_bt_mp.c

[...它继续下去然后出现这部分错误...]

rtl8188EUS_linux_v4.1.4_6773.20130222
Authentication requested [root] for make clean:
rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~
rm -fr .tmp_versions
rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order
cd core/efuse ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd core ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hal/rtl8188e/usb ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hal/rtl8188e ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko
cd hal/OUTSRC/rtl8188e ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko 
cd hal/OUTSRC/ ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko 
cd hal ; 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
Authentication requested [root] for make driver:
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/6.2.0-35-generic/build M=/home/ubuntu/Driver/linux/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222  modules
make[1]: Entering directory '/usr/src/linux-headers-6.2.0-35-generic'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: x86_64-linux-gnu-gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
  You are using:           gcc-11 (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
  CC [M]  /home/ubuntu/Driver/linux/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_cmd.o
In file included from /home/ubuntu/Driver/linux/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_cmd.c:23:
/home/ubuntu/Driver/linux/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/include/osdep_service.h: In function ‘_init_timer’:
/home/ubuntu/Driver/linux/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/include/osdep_service.h:956:15: error: ‘_timer’ {aka ‘struct timer_list’} has no member named ‘data’
  956 |         ptimer->data = (unsigned long)cntx;
      |               ^~
/home/ubuntu/Driver/linux/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/include/osdep_service.h:957:9: error: implicit declaration of function ‘init_timer’; did you mean ‘_init_timer’? [-Werror=implicit-function-declaration]
  957 |         init_timer(ptimer);
      |         ^~~~~~~~~~
      |         _init_timer
In file included from /home/ubuntu/Driver/linux/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_cmd.c:23:
/home/ubuntu/Driver/linux/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/include/osdep_service.h: In function ‘thread_enter’:
/home/ubuntu/Driver/linux/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/include/osdep_service.h:1423:9: error: implicit declaration of function ‘daemonize’ [-Werror=implicit-function-declaration]
 1423 |         daemonize("%s", name);
      |         ^~~~~~~~~
In file included from /home/ubuntu/Driver/linux/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_cmd.c:23:
/home/ubuntu/Driver/linux/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_cmd.c: In function ‘rtw_cmd_thread’:
/home/ubuntu/Driver/linux/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/include/osdep_service.h:847:31: error: implicit declaration of function ‘complete_and_exit’ [-Werror=implicit-function-declaration]
  847 |         #define thread_exit() complete_and_exit(NULL, 0)
      |                               ^~~~~~~~~~~~~~~~~
/home/ubuntu/Driver/linux/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_cmd.c:563:9: note: in expansion of macro ‘thread_exit’
  563 |         thread_exit();
      |         ^~~~~~~~~~~
/home/ubuntu/Driver/linux/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_cmd.c:565:1: error: control reaches end of non-void function [-Werror=return-type]
  565 | }
      | ^
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:260: /home/ubuntu/Driver/linux/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222/core/rtw_cmd.o] Error 1
make[1]: *** [Makefile:2026: /home/ubuntu/Driver/linux/RTL8188EUS_linux_v4.1.4_6773.20130222/driver/rtl8188EUS_linux_v4.1.4_6773.20130222] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.2.0-35-generic'
make: *** [Makefile:678: modules] Error 2
##################################################
Compile make driver error: 2
Please check error Mesg
##################################################

我无法弄清楚为什么我会遇到这个问题,而且我对 Linux 中的这个过程完全不了解,我无法理解我该如何解决这个问题。

相关内容