Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to locate package linux-tools-5.4.0-77-generic #7652

Open
1 of 2 tasks
hyst3ric41 opened this issue Nov 7, 2021 · 21 comments
Open
1 of 2 tasks

Unable to locate package linux-tools-5.4.0-77-generic #7652

hyst3ric41 opened this issue Nov 7, 2021 · 21 comments

Comments

@hyst3ric41
Copy link

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.html and 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

@NotTheDr01ds
Copy link

NotTheDr01ds commented Nov 17, 2021

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.

@xantari
Copy link

xantari commented Sep 14, 2022

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

@mbratch
Copy link

mbratch commented Oct 15, 2022

@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

@AlexTOOT
Copy link

AlexTOOT commented Nov 8, 2022

got same issue, running ubuntu 20.04 on wsl2

@deors
Copy link

deors commented Nov 9, 2022

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 usbip directly, 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 running 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
  • 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'

@tschieggm
Copy link

I am also running into the same issues as the poster above me with ubuntu 20.04 on windows 11

@Sudococommunity
Copy link

Sudococommunity commented Nov 12, 2022

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

@deors
Copy link

deors commented Nov 13, 2022

@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

@Sudococommunity
Copy link

Sudococommunity commented Nov 13, 2022

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

@deors
Copy link

deors commented Nov 13, 2022

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.

@AlexTOOT
Copy link

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

@deors
Copy link

deors commented Nov 19, 2022

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?

@razlani
Copy link

razlani commented Dec 11, 2022

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!

@Spencillian
Copy link

@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

A few things did to get it to work:

  1. Followed and used the commands from https://github.com/dorssel/usbipd-win/wiki/WSL-support supplied by @Sudococommunity.
  2. Then you run usbipd in Powershell Administrator mode, not WSL bash
  3. 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.
  4. Run lsusb in WSL bash and the device should be listed.

@CodemanVAN
Copy link

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

@CodemanVAN
Copy link

It's seems there is not supported by docker-desktop.image

@aalien
Copy link

aalien commented Jan 27, 2023

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

@funder7
Copy link

funder7 commented Feb 13, 2023

  1. Run lsusb in 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

ronger-x added a commit to ronger-x/vscode-esp-idf-extension that referenced this issue Feb 17, 2023
The previous command for installing usbipd on WSL had issues, as discussed in [Unable to locate package linux-tools-5.4.0-77-generic](microsoft/WSL#7652). This commit updates the command to the latest one provided in the [official documentation](https://github.com/dorssel/usbipd-win/wiki/WSL-support#usbip-client-tools).
brianignacio5 pushed a commit to espressif/vscode-esp-idf-extension that referenced this issue Feb 22, 2023
The previous command for installing usbipd on WSL had issues, as discussed in [Unable to locate package linux-tools-5.4.0-77-generic](microsoft/WSL#7652). This commit updates the command to the latest one provided in the [official documentation](https://github.com/dorssel/usbipd-win/wiki/WSL-support#usbip-client-tools).
MohabMohie added a commit to MohabMohie/WSL that referenced this issue Mar 5, 2023
updating with the correct command

'sudo apt install linux-tools-generic hwdata'
instead of the old one which doesn't work as per this issues thread microsoft/WSL#7652
@TernaryM01
Copy link

TernaryM01 commented Apr 5, 2023

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

@amav96
Copy link

amav96 commented Jan 30, 2024

@SudococommunitySí, ese comando funciona, pero no soluciona el problema relevante: no se encuentra el comando usbip.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) ...

próximousbip

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

entonces volvemos al punto de partida y ninguna de las alternativas sugeridas funciona

Se hicieron algunas cosas para que funcionara:

  1. Seguí y usé los comandos de https://github.com/dorssel/usbipd-win/wiki/WSL-support proporcionados por@Sudococommunity.
  2. Luego ejecuta usbipden modo Administrador de Powershell , no en WSL bash
  3. 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.
  4. 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.

@rachelxhoot
Copy link

I resolve the issue by referencing details from https://packages.ubuntu.com/focal/amd64/linux-tools-5.4.0-42-generic/download.

Add a new repository to /etc/apt/sources.list file with the following line:

deb http://security.ubuntu.com/ubuntu focal-security main

After updating the sources list with this new mirror, run the installation command again:

sudo apt-get install linux-tools-$(uname -r)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

17 participants