Score:0

"usbipd not found for kernel" with WSL2 (Windows 10)

ne flag

After usbipd wsl list

it returned back WARNING: usbipd not found for kernel 5.10.16.3-microsoft You may need to install the following packages for this specific kernel: linux-tools-5.10.16.3-microsoft-standard-WSL2 linux-cloud-tools-5.10.16.3-microsoft-standard-WSL2

You may also want to install one of the following packages to keep up to date: linux-tools-standard-WSL2 linux-cloud-tools-standard-WSL2

I used the solutions as follows.

  1. "usbipd not found for kernel" when using USB/IP with WSL. It showed: hwdata is already the newest version (0.333-1). linux-tools-5.4.0-77-generic is already the newest version (5.4.0-77.86). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

  2. https://superuser.com/questions/1694723/access-mobile-device-filesystem-from-wsl After installing jmtpfs and sudo jmtpfs -o allow_other /media/android/, it returned No mtp devices found., while the Android device is shown in File Management in Windows 10 (connected via MTP).

  3. https://superuser.com/questions/1686414/e-unable-to-locate-package-linux-tools-5-4-0-77-generic-on-wsl-debian-11/1688086#1688086. But after sudo apt install usbip hwdata usbutils, it returned E: Unable to locate package usbip.

  4. https://developer.ridgerun.com/wiki/index.php/How_to_setup_and_use_USB/IP it returned linux-tools-generic is already the newest version (5.4.0.139.137). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

  5. https://www.geekbits.io/how-to-install-usbip-tools-on-debian/ sudo make install returned make[1]: Entering directory '/mnt/d/test/libsrc' CC libusbip_la-names.lo /bin/bash: ../libtool: No such file or directory make[1]: *** [Makefile:460: libusbip_la-names.lo] Error 127 make[1]: Leaving directory '/mnt/d/test/libsrc' make: *** [Makefile:498: install-recursive] Error 1

And following sudo usbipd -D, it returned usbipd: error while loading shared libraries: libusbip.so.0: cannot open shared object file: No such file or directory.

The last but not the least, sudo apt update & sudo apt upgrade showed that all packages are up to date and upgraded.

Thanks in advance.

Score:1
ne flag

From my reading of the question, maybe it's necessary to link not only the client executable usbip but also the daemon utility usbipd (mind the trailing d)? Which means besides

sudo update-alternatives --install /usr/local/bin/usbip usbip $(command -v ls /usr/lib/linux-tools/*/usbip | tail -n1) 20

one may need

sudo update-alternatives --install /usr/local/bin/usbipd usbipd $(command -v ls /usr/lib/linux-tools/*/usbipd | tail -n1) 20
NotTheDr01ds avatar
vn flag
Welcome to Ask Ubuntu. Two things - First, thanks for noticing that this was `usbipd` (not `usbip` as I was thinking). Second, under WSL, the `usbipd` is provided by the host (Windows) rather than Ubuntu, so attempting to use the Ubuntu one won't work (and is likely the root problem). I'll revise my answer, but I do appreciate the second look at it!
NotTheDr01ds avatar
vn flag
I find this a bit weird - I upvoted even though the answer is *wrong*, but it *was helpful* ;-)
Nielo avatar
ne flag
I instantly agree :D Thx
Score:0
vn flag

Thanks to @Nielo for pointing out that you are attempting to run usbipd (not uspip, as I originally thought).

Under WSL:

  • The USB/IP daemon (usbipd.exe) is run under Windows, since it's Windows that is sharing (via usbipd bind) the device.
  • The USB/IP client (usbip) is what you should be running under Ubuntu, to connect to the device that was shared Windows daemon.

So from PowerShell in Windows, try running usbipd list (or usbipd wsl list)

Note: To run usbipd bind, you'll need to be in an Admin PowerShell.

Keep in mind that, as long as you are trying to connect a device to your default distribution, and you've set up the usbip command in Ubuntu as mentioned in my answer here, all of the usbipd commands can be run from an admin PowerShell.

For instance:

usbipd wsl list
# Identify BUSID of device to attach
usbipd wsl attach --busid <busid>

This does two things:

  • Binds/shares the device from Windows through the USB/IP daemon
  • Sends the appropriate command to Ubuntu to attach to the device.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.