iovisor / bcc

BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more
Apache License 2.0
19.91k stars 3.81k forks source link

Unable to locate package linux-headers on Ubuntu 24.04 WSL #5046

Open afan0918 opened 2 weeks ago

afan0918 commented 2 weeks ago

Description

I encountered an issue when trying to install bpfcc-tools and linux-headers on Ubuntu 24.04 WSL.

Steps to Reproduce

  1. Follow the steps to install dependencies and compile the kernel module as described in the documentation.
  2. Run the following command:
    sudo apt-get install bpfcc-tools linux-headers-$(uname -r)

The package linux-headers-5.15.153.1-microsoft-standard-WSL2 was not found. Maybe an alternative approach is needed.

Actual Behavior

The following error messages are displayed:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package linux-headers-5.15.153.1-microsoft-standard-WSL2
E: Couldn't find any package by glob 'linux-headers-5.15.153.1-microsoft-standard-WSL2'
E: Couldn't find any package by regex 'linux-headers-5.15.153.1-microsoft-standard-WSL2'
afan0918 commented 1 week ago

Additional Information

I would like to provide some additional details regarding the issue I reported earlier.

System Information

Problem Description

It appears that the uname -r command in WSL 2 returns a kernel version that does not correspond to any available linux-headers package in the repositories. This might be the reason why the linux-headers package cannot be located.