Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
9
rated 0 times [  9] [ 0]  / answers: 1 / hits: 9938  / 2 Years ago, mon, june 20, 2022, 2:48:56

Attempting to install USB/IP on Ubuntu 22.04 per the Microsoft docs:



On Ubuntu, run this command:


sudo apt install linux-tools-5.4.0-77-generic hwdata
sudo update-alternatives --install /usr/local/bin/usbip usbip /usr/lib/linux-tools/5.4.0-77-generic/usbip 20


But running that results in:


E: Unable to locate package linux-tools-5.4.0-77-generic
E: Couldn't find any package by glob 'linux-tools-5.4.0-77-generic'

How do I install USB/IP on Ubuntu 22.04 on WSL?


More From » usb

 Answers
6

While my original answer should still work, I've updated it with a slightly more optimal version based on the directions on the usbipd-win Wiki. Note that these instructions should also work under Ubuntu 20.04, as well as most Debian-lineage distributions:


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

This will install the usbip client from the latest Ubuntu kernel package. This client (/usr/lib/linux-tools-<x.xx.xx-x>/usbip) is compatible with the WSL2 kernel, but the linux-tools-common package includes a stub (/usr/bin/usbip) that tries to find the tools in a directory corresponding to the installed kernel.


Keep in mind that, no matter what, your WSL2 kernel is not going to match any kernel version in the Ubuntu repositories. For this reason, you'll need to create a symlink (via update-alternatives) with a higher priority than the linux-tools-common package's /usr/bin/usbip.


[#567] Monday, June 20, 2022, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
fectlyole

Total Points: 64
Total Questions: 110
Total Answers: 110

Location: Nicaragua
Member since Thu, Feb 3, 2022
2 Years ago
fectlyole questions
Sun, May 8, 22, 02:54, 2 Years ago
Mon, Jun 21, 21, 16:56, 3 Years ago
Fri, Jul 9, 21, 17:44, 3 Years ago
Mon, Apr 4, 22, 01:30, 2 Years ago
;