Unable to locate package linux-tools-5.4.0-77-generic
Version
Microsoft Windows [Versión 10.0.22000.282]
WSL Version
- [X] WSL 2
- [ ] WSL 1
Kernel Version
5.10.60.1
Distro Version
Debian 11 amd64
Other Software
No response
Repro Steps
I'm trying to follow this official guide to be able of talk with devices over COM ports. I've already updated to Windows 11 and last version of WSL2 kernel.
I'm stuck installing linux-tools-5.4.0-77-generic. I've already installed hwdata as the guide suggests.
I've tried:
- $ sudo apt upgrade.
- $ sudo apt update.
- Editing /etc/apt/sources.list manually.
- Download the binary files from
https://ubuntu.pkgs.org/18.04/ubuntu-updates-main-amd64/linux-tools-5.4.0-77-generic_5.4.0-77.86~18.04.1_amd64.deb.htmland installing manually with$ sudo apt install ./path/to/binary.file.deb.
But nothing works. Good internet connection.
Expected Behavior
Install the required packet with the command $ sudo apt install linux-tools-5.4.0-77-generic.
Actual Behavior
Execute $ sudo apt install linux-tools-5.4.0-77-generic gave me the following output:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
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'
Diagnostic Logs
No response
I've posted an answer on your Super User question, but to summarize the changes needed for Debian:
sudo apt install usbip hwdata usbutils
There's no need to modify sudoers with visudo since Debian installs usbib to /usr/sbin (which is already in the secure_path.
Ever figure this out?
foo@FOO-PC:/mnt/c/WINDOWS/system32$ sudo apt install linux-tools-5.4.0-77-generic hwdata [sudo] password for foo: Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package linux-tools-5.4.0-77-generic
@NotTheDr01ds
Attempt to run this:
sudo apt install usbip hwdata usbutils
Results in this:
Package usbip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'usbip' has no installation candidate
got same issue, running ubuntu 20.04 on wsl2
hi. same issue with ubuntu 20.04 on windows 11. tried the command
sudo apt install usbip hwdata usbutils
same output as described by @mbratch
also tried the following:
- run
usbipdirectly, and got this suggestion:
Command 'usbip' not found, but can be installed with:
sudo apt install linux-intel-iotg-tools-common # version 5.15.0-1016.21, or
sudo apt install linux-nvidia-tools-common # version 5.15.0-1007.7
sudo apt install linux-tools-common # version 5.15.0-52.58
- next, run
sudo apt install linux-tools-common. it installs fine and afterwards runningusbip:
WARNING: usbip not found for kernel 5.15.68.1-microsoft
You may need to install the following packages for this specific kernel:
linux-tools-5.15.68.1-microsoft-standard-WSL2
linux-cloud-tools-5.15.68.1-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've also tried to install the aforementioned packages, but they are not found by apt:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package linux-tools-standard-WSL2
- nor when using explicit kernel version:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package linux-tools-5.15.68.1-microsoft-standard-WSL2
E: Couldn't find any package by glob 'linux-tools-5.15.68.1-microsoft-standard-WSL2'
I am also running into the same issues as the poster above me with ubuntu 20.04 on windows 11
Your command is wrong bruh! just type apt install linux-tools-generic it will automatically detect the newest version on its own don't specify that don't do change in any config
@Sudococommunity yes that command works but it does nothing to the relevant issue: the command usbip is not found.
sudo apt install linux-tools-generic
The following additional packages will be installed:
linux-tools-5.15.0-52 linux-tools-5.15.0-52-generic
The following NEW packages will be installed:
linux-tools-5.15.0-52 linux-tools-5.15.0-52-generic linux-tools-generic
0 upgraded, 3 newly installed, 0 to remove and 19 not upgraded.
...
Setting up linux-tools-5.15.0-52 (5.15.0-52.58) ...
Setting up linux-tools-5.15.0-52-generic (5.15.0-52.58) ...
Setting up linux-tools-generic (5.15.0.52.52) ...
next
usbip
WARNING: usbip not found for kernel 5.15.68.1-microsoft
You may need to install the following packages for this specific kernel:
linux-tools-5.15.68.1-microsoft-standard-WSL2
linux-cloud-tools-5.15.68.1-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
so we are back at the starting point and none of the suggested alternatives work
by the way method you all are using to install usbip is wrong actually this command differ in wsl which is named as usbipd and to revoke the usbipd command just type usbipd --help but this will not work until you don't setup your wsl for this ( kernal you have installed for wsl has nothing to do with it no config will help out and the pakage is mentioned in error as well funny!! ) Go to this blog read it if problem persist than come back I help you out https://github.com/dorssel/usbipd-win/wiki/WSL-support
thanks a lot @Sudococommunity with linux-tools-virtual it worked and now isbup is installed and running. now I have to go but this evening I will continue the flow to mount and access the usb volume, but it looks much better now that needed commands are ready.
installed linux-tools-generic and worked. Problem is ‘linux-tools-5.4.0-77-generic’ is in the official guide of WSL which I think is inappropriate
it took longer than intended, but I finally had the time to test this again. I have been able now to attach the usb card reader to WSL. it is listed in lsusb and I can see it being attached in dmesg. however, it does not appear in lsblk or in fdisk. I have tested with two different card readers: my laptop card reader, and a USB-C attached Apple card reader. none of them worked. does anyone know whether card readers are supported by the driver?
installed linux-tools-generic and worked. Problem is ‘linux-tools-5.4.0-77-generic’ is in the official guide of WSL which I think is inappropriate
Defs needs an update!
@Sudococommunity yes that command works but it does nothing to the relevant issue: the command usbip is not found.
sudo apt install linux-tools-genericThe following additional packages will be installed: linux-tools-5.15.0-52 linux-tools-5.15.0-52-generic The following NEW packages will be installed: linux-tools-5.15.0-52 linux-tools-5.15.0-52-generic linux-tools-generic 0 upgraded, 3 newly installed, 0 to remove and 19 not upgraded. ... Setting up linux-tools-5.15.0-52 (5.15.0-52.58) ... Setting up linux-tools-5.15.0-52-generic (5.15.0-52.58) ... Setting up linux-tools-generic (5.15.0.52.52) ...next
usbipWARNING: usbip not found for kernel 5.15.68.1-microsoft You may need to install the following packages for this specific kernel: linux-tools-5.15.68.1-microsoft-standard-WSL2 linux-cloud-tools-5.15.68.1-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-WSL2so we are back at the starting point and none of the suggested alternatives work
A few things did to get it to work:
- Followed and used the commands from https://github.com/dorssel/usbipd-win/wiki/WSL-support supplied by @Sudococommunity.
- Then you run
usbipdin Powershell Administrator mode, not WSL bash - Follow the rest of the guide from the original Microsoft page https://learn.microsoft.com/en-us/windows/wsl/connect-usb for instructions on how to attach and detach. These commands need to be run in Powershell. I spent way to long trying to figure out why bash wasn't working.
- Run
lsusbin WSL bash and the device should be listed.
I run the same error the Windows 11 on WSL2, I have installed usbip and it's worked.
$ lsusb
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
$ usbip version
usbip (usbip-utils 2.0)
I also have installed the deb :
- linux-tools-5.4.0-26-generic_5.4.0-26.30_amd64.deb
- linux-tools-5.4.0-26_5.4.0-26.30_amd64.deb
- linux-tools-common_5.4.0-26.30_all.deb But when I run cmd usbipd attatch x-x, an error came out with message:
usbipd: error: WSL 'usbip' client not correctly installed. I don't know what is going wrong.
$ uname -a
Linux cd1a98b0ac18 5.15.79.1-microsoft-standard-WSL2 #1 SMP Wed Nov 23 01:01:46 UTC 2022 x86_64 GNU/Linux
It's seems there is not supported by docker-desktop.
Instructions are still unchanged. At the moment, linux-tools-generic installs version 5.15.0-58-generic, while the kernel after wsl --update is 5.15.79.1-microsoft-standard-WSL2. Running usbip give a message suggesting to install either linux-tools-5.15.79.1-microsoft-standard-WSL2 or linux-tools-standard-WSL2, but there are no packages available with those names.
Workaround /usr/bin/usbip and usbipd are actually just scripts, which check for the "correct" version. That check seems to be very specific. As a workaround I removed /usr/bin/usbip and /usr/bin/usbipd, and symlinked /usr/lib/linux-tools/5.15.0-58-generic/usbip and /usr/lib/linux-tools/5.15.0-58-generic/usbipd to /usr/bin. Kernel is version 5.15.x and linux-tools is version 5.15.x, which I presume is close enough to work, and in practice it does.
sudo update-alternatives --install /usr/local/bin/usbip usbip `ls /usr/lib/linux-tools/*/usbip | tail -n1` 20
sudo update-alternatives --install /usr/local/bin/usbipd usbipd `ls /usr/lib/linux-tools/*/usbipd | tail -n1` 20
- Run
lsusbin WSL bash and the device should be listed.
My God.. thanks, I was trying in wsl :-D PS: on my pc it worked, I installed the generic packages as suggested here.
Cheers
I have installed linux-tools-generic successfully, but it seems that some weird WSL-only command aliasing is preventing me from running any program from it.
I have added /usr/lib/linux-tools/5.15.0-69-generic to PATH in .bashrc. But if I run, for example:
perf
I get: WARNING: perf not found for kernel 5.15.90.1-microsoft [ . . . ]
but the program exists! So if I run:
/usr/lib/linux-tools/5.15.0-69-generic/perf
it runs, showing: usage: perf [--version] (bla bla . . . ) The most commonly used perf commands . . .
This also works if I cd /usr/lib/linux-tools/5.15.0-69-generic and then ./perf.
I have relaunched the terminal, even restarted WSL, and verified having added the directory to PATH with echo $PATH. The problem persists...
I have filed a separate issue for this: #9917
@SudococommunitySí, ese comando funciona, pero no soluciona el problema relevante: no se encuentra el comando usbip.
sudo apt install linux-tools-genericThe following additional packages will be installed: linux-tools-5.15.0-52 linux-tools-5.15.0-52-generic The following NEW packages will be installed: linux-tools-5.15.0-52 linux-tools-5.15.0-52-generic linux-tools-generic 0 upgraded, 3 newly installed, 0 to remove and 19 not upgraded. ... Setting up linux-tools-5.15.0-52 (5.15.0-52.58) ... Setting up linux-tools-5.15.0-52-generic (5.15.0-52.58) ... Setting up linux-tools-generic (5.15.0.52.52) ...próximo
usbipWARNING: usbip not found for kernel 5.15.68.1-microsoft You may need to install the following packages for this specific kernel: linux-tools-5.15.68.1-microsoft-standard-WSL2 linux-cloud-tools-5.15.68.1-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-WSL2entonces volvemos al punto de partida y ninguna de las alternativas sugeridas funciona
Se hicieron algunas cosas para que funcionara:
- Seguí y usé los comandos de https://github.com/dorssel/usbipd-win/wiki/WSL-support proporcionados por@Sudococommunity.
- Luego ejecuta
usbipden modo Administrador de Powershell , no en WSL bash- Siga el resto de la guía de la página original de Microsoft https://learn.microsoft.com/en-us/windows/wsl/connect-usb para obtener instrucciones sobre cómo conectar y desconectar. Estos comandos deben ejecutarse en Powershell . Pasé demasiado tiempo tratando de descubrir por qué bash no funcionaba.
- Ejecute
lsusben WSL bash y el dispositivo debería aparecer en la lista.
This is the correct answer, i was 2 days trying to connect my devices. This worked.