WSL: Unable to locate package linux-tools-5.4.0-77-generic
Version
Microsoft Windows [Versión 10.0.22000.282]
WSL Version
- 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
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 23 (1 by maintainers)
Commits related to this issue
- fix WSL installation command for usbipd The previous command for installing usbipd on WSL had issues, as discussed in [Unable to locate package linux-tools-5.4.0-77-generic](https://github.com/micros... — committed to ronger-x/vscode-esp-idf-extension by ronger-x 4 years ago
- fix WSL installation command for usbipd (#892) The previous command for installing usbipd on WSL had issues, as discussed in [Unable to locate package linux-tools-5.4.0-77-generic](https://github.com... — committed to espressif/vscode-esp-idf-extension by ronger-x 4 years ago
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
hi. same issue with ubuntu 20.04 on windows 11. tried the command
sudo apt install usbip hwdata usbutilssame output as described by @mbratchalso tried the following:
usbipdirectly, and got this suggestion:sudo apt install linux-tools-common. it installs fine and afterwards runningusbip:I’ve posted an answer on your Super User question, but to summarize the changes needed for Debian:
There’s no need to modify
sudoerswithvisudosince Debian installsusbibto/usr/sbin(which is already in thesecure_path.@Sudococommunity yes that command works but it does nothing to the relevant issue: the command usbip is not found.
sudo apt install linux-tools-genericnext
usbipso we are back at the starting point and none of the suggested alternatives work
@NotTheDr01ds
Attempt to run this:
sudo apt install usbip hwdata usbutilsResults in this:
A few things did to get it to work:
usbipdin Powershell Administrator mode, not WSL bashlsusbin WSL bash and the device should be listed.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
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.
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
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
This issue has been automatically closed since it has not had any activity for the past year. If you’re still experiencing this issue please re-file this as a new issue or feature request.
Thank you!
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-genericto PATH in .bashrc. But if I run, for example:perfI 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/perfit runs, showing: usage: perf [–version] (bla bla . . . ) The most commonly used perf commands . . . This also works if Icd /usr/lib/linux-tools/5.15.0-69-genericand 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