运行提供的 install.sh(sudo ./install.sh)时出现错误:
##################################################
Realtek Wi-Fi driver Auto installation script
Novembor, 21 2011 v1.1.0
##################################################
我删除了这里中间一些有关解压 tar 文件的日志。
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.10.0-28-generic/build M=/home/swift/Desktop/Linux/driver/rtl8812AU_linux_v4.3.13_14061.20150505 modules
make[1]: Entering directory '/usr/src/linux-headers-4.10.0-28-generic'
CC [M] /home/swift/Desktop/Linux/driver/rtl8812AU_linux_v4.3.13_14061.20150505/core/rtw_cmd.o
In file included from /home/swift/Desktop/Linux/driver/rtl8812AU_linux_v4.3.13_14061.20150505/include/drv_types.h:95:0,
from /home/swift/Desktop/Linux/driver/rtl8812AU_linux_v4.3.13_14061.20150505/core/rtw_cmd.c:22:
/home/swift/Desktop/Linux/driver/rtl8812AU_linux_v4.3.13_14061.20150505/include/hal_com.h:412:13: error: ‘file_path’ redeclared as different kind of symbol
extern char file_path[PATH_LENGTH_MAX];
^
In file included from ./include/linux/seq_file.h:10:0,
from ./include/linux/pinctrl/consumer.h:17,
from ./include/linux/pinctrl/devinfo.h:21,
from ./include/linux/device.h:24,
from ./include/linux/dmaengine.h:20,
from ./include/linux/netdevice.h:38,
from /home/swift/Desktop/Linux/driver/rtl8812AU_linux_v4.3.13_14061.20150505/include/osdep_service_linux.h:35,
from /home/swift/Desktop/Linux/driver/rtl8812AU_linux_v4.3.13_14061.20150505/include/osdep_service.h:41,
from /home/swift/Desktop/Linux/driver/rtl8812AU_linux_v4.3.13_14061.20150505/include/drv_types.h:32,
from /home/swift/Desktop/Linux/driver/rtl8812AU_linux_v4.3.13_14061.20150505/core/rtw_cmd.c:22:
./include/linux/fs.h:2680:14: note: previous declaration of ‘file_path’ was here
extern char *file_path(struct file *, char *, int);
^
scripts/Makefile.build:294: recipe for target '/home/swift/Desktop/Linux/driver/rtl8812AU_linux_v4.3.13_14061.20150505/core/rtw_cmd.o' failed
make[2]: *** [/home/swift/Desktop/Linux/driver/rtl8812AU_linux_v4.3.13_14061.20150505/core/rtw_cmd.o] Error 1
Makefile:1524: recipe for target '_module_/home/swift/Desktop/Linux/driver/rtl8812AU_linux_v4.3.13_14061.20150505' failed
make[1]: *** [_module_/home/swift/Desktop/Linux/driver/rtl8812AU_linux_v4.3.13_14061.20150505] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.10.0-28-generic'
Makefile:1622: recipe for target 'modules' failed
make: *** [modules] Error 2
##################################################
Compile make driver error: 2
Please check error Mesg
##################################################
答案1
我建议你尝试一下:
sudo apt-get update
sudo apt install git dkms
git clone https://github.com/gnab/rtl8812au.git
sudo cp -r rtl8812au /usr/src/rtl8812au-4.2.2
sudo dkms add -m rtl8812au -v 4.2.2
sudo dkms build -m rtl8812au -v 4.2.2
sudo dkms install -m rtl8812au -v 4.2.2
重启。
答案2
我发现 gord-rtl8812au-dkms_1.0-9_amd64.deb 在 16.04.3-64 上运行良好。我建议 Ubuntu 检查一下,并替换掉线严重的 4.3.8.12175.20140902+dfsg-0ubuntu2。 https://github.com/MilhouseVH/rtl8812au-1/blob/master/gord-rtl8812au-dkms_1.0-9_amd64.deb