如何在没有Internet访问的情况下编译TP-Link T9UH无线驱动程序? 我遇到了问题

我正在使用干净的Ubuntu 16LTS安装,其中没有任何其他内容。 我有安装驱动程序的文件,默认情况下安装了正确的GCC /内核要求。 但是当我跑步的时候

干净

使

它遇到了几个错误。 由于没有互联网连接,我无法安装软件,不幸的是,似乎所有指南都自动假设我在安装驱动程序时有互联网连接。

我试图将我的Android手机连接到PC,这样我就可以下载合适的软件,但我的电脑甚至没有检测到Android手机! 我不能使用USB连接,因为手机只是没有注册,即使用lsusb检查。 它似乎在充电。 我也试过不同的端口。 可能是因为我正在运行自定义ROM,尽管我非常怀疑。

Uname -r + lsusb:

gabriel@gabriel-desktop:~/Documents/T9UH_linux_v4.3.21.1_24835.20171031$ uname -r 4.13.0-36-generic gabriel@gabriel-desktop:~/Documents/T9UH_linux_v4.3.21.1_24835.20171031$ lsusb Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 004: ID 057e:0337 Nintendo Co., Ltd Bus 003 Device 003: ID 2357:0106 Bus 003 Device 002: ID 046d:c52e Logitech, Inc. MK260 Wireless Combo Receiver Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 001 Device 003: ID 046d:c24d Logitech, Inc. G710 Gaming Keyboard Bus 001 Device 002: ID 0846:9011 NetGear, Inc. WNDA3100v2 802.11abgn [Broadcom BCM4323] Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub gabriel@gabriel-desktop:~/Documents/T9UH_linux_v4.3.21.1_24835.20171031$ 

结果: https : //hastebin.com/toselovosi.rb

 make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/4.13.0-36-generic/build M=/home/gabriel/Documents/T9UH_linux_v4.3.21.1_24835.20171031 modules make[1]: Entering directory '/usr/src/linux-headers-4.13.0-36-generic' CC [M] /home/gabriel/Documents/T9UH_linux_v4.3.21.1_24835.20171031/core/rtw_cmd.o In file included from /home/gabriel/Documents/T9UH_linux_v4.3.21.1_24835.20171031/include/drv_types.h:32:0, from /home/gabriel/Documents/T9UH_linux_v4.3.21.1_24835.20171031/core/rtw_cmd.c:22: /home/gabriel/Documents/T9UH_linux_v4.3.21.1_24835.20171031/include/osdep_service.h: In function 'thread_enter': /home/gabriel/Documents/T9UH_linux_v4.3.21.1_24835.20171031/include/osdep_service.h:343:2: error: implicit declaration of function 'allow_signal' [-Werror=implicit-function-declaration] allow_signal(SIGTERM); ^ /home/gabriel/Documents/T9UH_linux_v4.3.21.1_24835.20171031/include/osdep_service.h: In function 'flush_signals_thread': /home/gabriel/Documents/T9UH_linux_v4.3.21.1_24835.20171031/include/osdep_service.h:353:6: error: implicit declaration of function 'signal_pending' [-Werror=implicit-function-declaration] if (signal_pending (current)) ^ /home/gabriel/Documents/T9UH_linux_v4.3.21.1_24835.20171031/include/osdep_service.h:355:3: error: implicit declaration of function 'flush_signals' [-Werror=implicit-function-declaration] flush_signals(current); ^ cc1: some warnings being treated as errors scripts/Makefile.build:308: recipe for target '/home/gabriel/Documents/T9UH_linux_v4.3.21.1_24835.20171031/core/rtw_cmd.o' failed make[2]: *** [/home/gabriel/Documents/T9UH_linux_v4.3.21.1_24835.20171031/core/rtw_cmd.o] Error 1 Makefile:1550: recipe for target '_module_/home/gabriel/Documents/T9UH_linux_v4.3.21.1_24835.20171031' failed make[1]: *** [_module_/home/gabriel/Documents/T9UH_linux_v4.3.21.1_24835.20171031] Error 2 make[1]: Leaving directory '/usr/src/linux-headers-4.13.0-36-generic' Makefile:1714: recipe for target 'modules' failed make: *** [modules] Error 2 

请在另一台计算机上下载此文件,并使用USB密钥或类似工具将其传输到Ubuntu计算机的桌面。 https://github.com/zebulon2/rtl8814au/archive/master.zip

现在打开一个终端并执行:

 cd ~/Desktop unzip master.zip cd rtl8814au-master make sudo make install sudo modprobe 8814au 

如果没有错误,当互联网可用时,我们将转换为dkms,因此您无需在内核更新后重新编译。

编辑 :要启用dkms以便在每次内核更新后无需重新编译,请打开终端并安装dkms:

 sudo apt install dkms 

如果它已经安装,那没关系,只需继续:

 cd ~/Desktop/rtl8814au-master sudo cp -R . /usr/src/rtl8814au-4.3.21 sudo dkms build -m rtl8814au -v 4.3.21 sudo dkms install -m rtl8814au -v 4.3.21 

你应该全力以赴。