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

Can not use sysdig in WSL #2144

Open
PaleNeutron opened this issue Feb 19, 2025 · 1 comment
Open

Can not use sysdig in WSL #2144

PaleNeutron opened this issue Feb 19, 2025 · 1 comment

Comments

@PaleNeutron
Copy link

Here is the install log

 $ curl -s https://download.sysdig.com/stable/install-sysdig | sudo bash
* Detecting operating system
* Installing Sysdig public key
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK
* Installing Sysdig repository
W: https://download.sysdig.com/stable/deb/stable-amd64/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
* Installing kernel headers
E: Unable to locate package linux-headers-5.15.167.4-microsoft-standard-WSL2
E: Couldn't find any package by glob 'linux-headers-5.15.167.4-microsoft-standard-WSL2'
E: Couldn't find any package by regex 'linux-headers-5.15.167.4-microsoft-standard-WSL2'
Unable to find kernel development files for the current kernel version 5.15.167.4-microsoft-standard-WSL2
This usually means that your system is not up-to-date or you installed a custom kernel version.
The installation will continue but you'll need to install these yourself in order to use Sysdig.
Please write to the mailing list at https://groups.google.com/forum/#!forum/sysdig
if you need further assistance.
* Installing Sysdig
Selecting previously unselected package sysdig.
(Reading database ... 334362 files and directories currently installed.)
Preparing to unpack .../sysdig_0.40.0-alpha3_amd64.deb ...
Unpacking sysdig (0.40.0-alpha3) ...
Setting up sysdig (0.40.0-alpha3) ...
Loading new scap-8.0.0+driver DKMS files...
Building for 5.15.167.4-microsoft-standard-WSL2
Module build for kernel 5.15.167.4-microsoft-standard-WSL2 was skipped since the
kernel headers for this kernel do not seem to be installed.
Processing triggers for man-db (2.12.0-4build2) ...
modprobe: FATAL: Module scap not found.

If I run it:

$ sudo sysdig -c spy_deletes ./tests
[sudo] password for john:
Unable to load the driver
error opening device /dev/scap0. Make sure you have root credentials and that the scap module is loaded: No such file or directory

My WSL distro and kernel is

Ubuntu 24.04
Linux 049171BG01 5.15.167.4-microsoft-standard-WSL2 #1 SMP Tue Nov 5 00:21:55 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
@therealbobo
Copy link
Contributor

The problem lays here kernel headers for this kernel do not seem to be installed. You could also give a try to the --modern-bpf flag :)

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

2 participants