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.15.133.1-microsoft-standard-WSL2 #10913

Closed
1 of 2 tasks
Girasolo opened this issue Dec 13, 2023 · 12 comments
Closed
1 of 2 tasks

Unable to locate package linux-tools-5.15.133.1-microsoft-standard-WSL2 #10913

Girasolo opened this issue Dec 13, 2023 · 12 comments

Comments

@Girasolo
Copy link

Girasolo commented Dec 13, 2023

Windows Version

Microsoft Windows [Versione 10.0.22631.2715]

WSL Version

2.0.9.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.133.1-1

Distro Version

Ubuntu 22.04

Other Software

apt-get install linux-tools-5.15.133.1-microsoft-standard-WSL2 gives " E: Unable to locate package linux-tools-5.15.133.1-microsoft-standard-WSL2". I'm need this package to use eBPF.

Repro Steps

#Dockerfile
FROM ubuntu:22.04

Run the command to install the required packages

RUN apt-get update && apt-get install -y iputils-ping && apt-get install -y iproute2 coreutils iptables nodejs npm syslog-ng

RUN apt-get install -y apt-transport-https ca-certificates curl clang llvm jq &&
apt-get install -y libelf-dev libpcap-dev libbfd-dev binutils-dev build-essential make &&
apt-get install -y linux-tools-common linux-tools-$(uname -r) &&
apt-get install -y bpfcc-tools &&
apt-get install -y python3-pip && \

CMD ["/bin/bash"]

#RUN
in the folder of Dockerfile run
docker build -t temp
docker run --privileged -it temp

Expected Behavior

I expect to build the image without any error. If the package is not available can you please suggest me a previous version of the kernel to rollback?

Actual Behavior

The execution will stop because of "524.1 E: Unable to locate package linux-tools-5.15.133.1-microsoft-standard-WSL2
524.1 E: Couldn't find any package by glob 'linux-tools-5.15.133.1-microsoft-standard-WSL2'
524.1 E: Couldn't find any package by regex 'linux-tools-5.15.133.1-microsoft-standard-WSL2'

failed to solve: process "/bin/sh -c apt-get install -y apt-transport-https ca-certificates curl clang llvm jq && apt-get install -y libelf-dev libpcap-dev libbfd-dev binutils-dev build-essential make && apt-get install -y linux-tools-common linux-tools-$(uname -r) && apt-get install -y bpfcc-tools && apt-get install -y python3-pip && CMD ["/bin/bash"]" did not complete successfully: exit code: 100"

Diagnostic Logs

No response

Copy link

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@OneBlue
Copy link
Collaborator

OneBlue commented Dec 13, 2023

The issue is this: apt-get install -y linux-tools-common linux-tools-$(uname -r). The WSL kernel doesn't have matching packages in distributions repositories.

Depending on what you're trying to do you might need do build your own kernel

@OneBlue OneBlue closed this as completed Dec 13, 2023
@Girasolo
Copy link
Author

Girasolo commented Dec 13, 2023

I know the problematic line is that one. I am trying to run a simple example of program with eBPF preparing the environment as described in this repo:
https://github.com/lizrice/learning-ebpf/blob/main/learning-ebpf.yaml

since the package is not available for this kernel distribution my idea was to rollback to a previous one. Among the issues of the repo I found this:
lizrice/learning-ebpf#14

with this line "apt-get install -y linux-tools-common linux-tools-5.15.0-41-generic bpfcc-tools"

However in the previous releases of the kernel (https://github.com/microsoft/WSL2-Linux-Kernel/releases?page=2) I can't find this version.

All I need is a version that has this package.

Maybe I misunderstood: are you telling me that is not possible to find this package in any wsl distribution?

Thank very much for the answer!

EDIT: I just noticed the kernel version used here "apt-get install -y linux-tools-common linux-tools-5.15.0-41-generic bpfcc-tools" is not a WSL kernel.

@OneBlue
Copy link
Collaborator

OneBlue commented Dec 13, 2023

Maybe I misunderstood: are you telling me that is not possible to find this package in any wsl distribution?

Unfortunately yes. If you need kernel headers / modules you will need to build them yourself.

@jtmic
Copy link

jtmic commented Dec 31, 2023

Hey, I'm actually having the same exact problem. I am trying to install the drivers for my T2u plus, and I get the exact same error as you. I have been searching for help on this but this looks like the only thread for this right now. We might have to build our own kernel like mentioned above, if anyone has any suggestions please reply!

@Girasolo
Copy link
Author

Hey, I'm actually having the same exact problem. I am trying to install the drivers for my T2u plus, and I get the exact same error as you. I have been searching for help on this but this looks like the only thread for this right now. We might have to build our own kernel like mentioned above, if anyone has any suggestions please reply!

Finally I just changed host operative system. Now I am using Ubuntu 22.04 and I am able to download those tools

@August-L-J
Copy link

Hey, I'm actually having the same exact problem. I am trying to install the drivers for my T2u plus, and I get the exact same error as you. I have been searching for help on this but this looks like the only thread for this right now. We might have to build our own kernel like mentioned above, if anyone has any suggestions please reply!

Finally I just changed host operative system. Now I am using Ubuntu 22.04 and I am able to download those tools

Hello bro, may I ask how you specifically solved this problem? I also encountered such errors:
My version is WSL2
Ubuntu, version 22.04
E:Unable to locate package linux-headers-5.15.133.1-microsoft-standard-WSL2 E: Couldn't find any package by glob 'linux-headers-5.15.133.1-microsoft-standard-WSL2' E: Couldn't find any package by regex 'linux-headers-5.15.133.1-microsoft-standard-WSL2'
I have spent a lot of time looking for the answer. I hope you can give me some detailed reply, which will be greatly appreciated

@RazviAlex
Copy link

Same problem here..

Girasolo

Hey @Girasolo Have you been able to solve the header problem? or have you changed your Linux distribution?

@Girasolo
Copy link
Author

Hi, I just installed Ubuntu 22.04 on an external hard disk and now I'm using that as a host. This will allow you to choose the kernel you prefer and with the necessary packets.

Sometimes working in windows is just impossible. I gave up.

@samysousa
Copy link

If closed, what is the solution ?
Not clear how to resolve.
I think most people are just looking to have the accompanying tools for any Kernel, thus building your own does not seem to provide the "linux-tools" like upbipd and other associated with your custom kernel build

@Girasolo
Copy link
Author

Hi @samysousa I guess that with "building your own" was meant to EDIT the one linked (https://github.com/microsoft/WSL2-Linux-Kernel) and then build it. I honestly have no idea of how to modify it but, as a side project, could be interesting to learn. In this period I did not have the time to do it. If you are in a similar situation I would just suggest you to use linux as a host.
If you are going to edit WSL2 and it work please share with us your solution!

@samysousa
Copy link

samysousa commented May 3, 2024

Hi @samysousa I guess that with "building your own" was meant to EDIT the one linked (https://github.com/microsoft/WSL2-Linux-Kernel) and then build it. I honestly have no idea of how to modify it but, as a side project, could be interesting to learn. In this period I did not have the time to do it. If you are in a similar situation I would just suggest you to use linux as a host. If you are going to edit WSL2 and it work please share with us your solution!

My initial goal was to get USB IP support into the kernel, so i used this guide.

https://github.com/dorssel/usbipd-win/wiki/WSL-support

Perhaps with the "menuconfig" command, you can select the different modules you might want to add, none the less might not give you the Tools, but it will give you what ever other modules and features to activate in a custom kernel.

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

6 participants