我把内容都复制出来了
安装dkms
Roy@RoyPC:~/build/rtl8821CU-master$ sudo apt-get install dkms
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
dkms 已经是最新版 (2.7.1-4ubuntu2)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
有 2 个软件包没有被完全安装或卸载。
解压缩后会消耗 0 B 的额外空间。
您希望继续执行吗? [Y/n] y
正在设置 mt7610u-dkms (0.2~trusty) ...
Loading new mt7610u-0.2~trusty DKMS files...
Building for 5.3.0-18-generic
Building for architecture x86_64
Building initial module for 5.3.0-18-generic
ERROR (dkms apport): kernel package linux-headers-5.3.0-18-generic is not supported
Error! Bad return status for module build on kernel: 5.3.0-18-generic (x86_64)
Consult /var/lib/dkms/mt7610u/0.2~trusty/build/make.log for more information.
dpkg: 处理软件包 mt7610u-dkms (--configure)时出错:
已安装 mt7610u-dkms 软件包 post-installation 脚本 子进程返回错误状态 10
正在设置 rtl8192cu-dkms (0.2~trusty) ...
Loading new rtl8192cu-0.2~trusty DKMS files...
Building for 5.3.0-18-generic
Building for architecture x86_64
Building initial module for 5.3.0-18-generic
ERROR (dkms apport): kernel package linux-headers-5.3.0-18-generic is not supported
Error! Bad return status for module build on kernel: 5.3.0-18-generic (x86_64)
Consult /var/lib/dkms/rtl8192cu/0.2~trusty/build/make.log for more information.
dpkg: 处理软件包 rtl8192cu-dkms (--configure)时出错:
已安装 rtl8192cu-dkms 软件包 post-installation 脚本 子进程返回错误状态 10
在处理时有错误发生:
mt7610u-dkms
rtl8192cu-dkms
E: Sub-process /usr/bin/dpkg returned an error code (1)
安装rtl8821cu
roy@RoyPC:~/build/rtl8821CU-master$ make
make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.3.0-18-generic/build M=/home/roy/build/rtl8821CU-master modules
make[1]: 进入目录“/usr/src/linux-headers-5.3.0-18-generic”
Building modules, stage 2.
MODPOST 1 modules
make[1]: 离开目录“/usr/src/linux-headers-5.3.0-18-generic”
roy@RoyPC:~/build/rtl8821CU-master$ sudo make install
mkdir -p /lib/modules/5.3.0-18-generic/kernel/drivers/net/wireless/realtek/rtl8821cu/
install -p -m 644 8821cu.ko /lib/modules/5.3.0-18-generic/kernel/drivers/net/wireless/realtek/rtl8821cu/
/sbin/depmod -a 5.3.0-18-generic
roy@RoyPC:/lib/modules/5.3.0-18-generic/kernel/drivers/net/wireless/realtek/rtl8821cu$ ls /lib/modules/5.3.0-18-generic/kernel/drivers/net/wireless/realtek/rtl8821cu/
8821cu.ko
网卡模式转换
roy@RoyPC:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 1c4f:0034 SiGma Micro Usb Mouse
Bus 001 Device 003: ID 413c:2111 Dell Computer Corp. Dell USB Wired Entry Keyboard
Bus 001 Device 005: ID 0bda:1a2b Realtek Semiconductor Corp. DISK
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
roy@RoyPC:~$ sudo usb_modeswitch -KW -v 0bda -p 1a2b
[sudo] roy 的密码:
Take all parameters from the command line
* usb_modeswitch: handle USB devices with multiple modes
* Version 2.1.1 (C) Josua Dietze 2014
* Based on libusb1/libusbx
! PLEASE REPORT NEW CONFIGURATIONS !
DefaultVendor= 0x0bda
DefaultProduct= 0x1a2b
StandardEject=1
NeedResponse=0
Look for default devices ...
found USB ID 1d6b:0003
found USB ID 1c4f:0034
found USB ID 413c:2111
found USB ID 0bda:1a2b
vendor ID matched
product ID matched
found USB ID 1d6b:0002
Found devices in default mode (1)
Access device 005 on bus 001
Current configuration number is 1
Use interface number 0
Use endpoints 0x0b (out) and 0x8a (in)
USB description data (for identification)
-------------------------
Manufacturer: Realtek
Product: DISK
Serial No.: not provided
-------------------------
Sending standard EJECT sequence
Looking for active driver ...
OK, driver detached
Set up interface 0
Use endpoint 0x0b for message sending ...
Trying to send message 1 to endpoint 0x0b ...
OK, message successfully sent
Read the response to message 1 (CSW) ...
Response successfully read (13 bytes).
Trying to send message 2 to endpoint 0x0b ...
OK, message successfully sent
Read the response to message 2 (CSW) ...
Response successfully read (13 bytes).
Reset response endpoint 0x8a
libusb: error [op_clear_halt] clear_halt failed error -1 errno 71
Could not reset endpoint (probably harmless): -99
Reset message endpoint 0x0b
libusb: error [op_clear_halt] clear_halt failed error -1 errno 71
Could not reset endpoint (probably harmless): -99
Device is gone, skip any further commands
-> Run lsusb to note any changes. Bye!
roy@RoyPC:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 1c4f:0034 SiGma Micro Usb Mouse
Bus 001 Device 003: ID 413c:2111 Dell Computer Corp. Dell USB Wired Entry Keyboard
Bus 001 Device 006: ID 0bda:c811 Realtek Semiconductor Corp. 802.11ac NIC
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub