![WSL2 modprobe usbmon 丢失?](https://linux22.com/image/1198446/WSL2%20modprobe%20usbmon%20%E4%B8%A2%E5%A4%B1%EF%BC%9F.png)
根据这一页,我应该能够在 WSL2 中使用 usbmon 和其他 USB 实用程序。我完全按照说明操作,Windows 部分运行正常(安装 USB 直通驱动程序),当我将 Arduino Uno USB 串行端口设备连接到 WSL2 时,它确实显示在列表中。但usbmon
由于缺少必需的模块,因此无法访问模块。以 root 身份运行它也无济于事。这是为学校准备的,我遵循学校的手册。我做错了什么?
marpolda@DESKTOP-IQ3BUTG:~$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 002: ID 1a86:7523 QinHeng Electronics CH340 serial converter
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
marpolda@DESKTOP-IQ3BUTG:~$ modprobe usbmon
modprobe: FATAL: Module usbmon not found in directory /lib/modules/5.15.90.1-microsoft-standard-WSL2
marpolda@DESKTOP-IQ3BUTG:~$ sudo apt install usbmon
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package usbmon
这是我在 WSL2 中使用的 Linux 内核版本:
marpolda@DESKTOP-IQ3BUTG:/boot$ uname -a
Linux DESKTOP-IQ3BUTG 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
从 Windows 到 WSL2 的 USB 连接如下所示:
C:\Users\marpo>usbipd wsl list
BUSID VID:PID DEVICE STATE
1-1 1a86:7523 USB-SERIAL CH340 (COM3) Not attached
1-3 1bcf:0005 Vstupní zařízení USB Not attached
1-5 0408:a060 HD WebCam Not attached
1-14 8087:0aaa Intel(R) Wireless Bluetooth(R) Not attached
C:\Users\marpo>usbipd wsl attach --busid 1-1
C:\Users\marpo>usbipd wsl list
BUSID VID:PID DEVICE STATE
1-1 1a86:7523 USB-SERIAL CH340 (COM3) Attached - WSL
1-3 1bcf:0005 Vstupní zařízení USB Not attached
1-5 0408:a060 HD WebCam Not attached
1-14 8087:0aaa Intel(R) Wireless Bluetooth(R) Not attached
这是 WSL 版本:
C:\Users\marpo>wsl --version
Verze WSL: 1.2.5.0
Verze jádra: 5.15.90.1
Verze WSLg: 1.0.51
Verze MSRDC: 1.2.3770
Verze Direct3D: 1.608.2-61064218
Verze DXCore: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Verze Windows: 10.0.25987.1000