You are not logged in.

#1 2026-01-06 06:39:32

classikh
Member
Registered: 2023-06-13
Posts: 45

[SOLVED] Cannot find 'uapi/linux/ptrace.h'

I have started learning ebpf and when i compile this code or open in my ide(neovim and vscode). it gives this error

❯ clang -O2 -target bpf -c ebpf.c -o ebpf.o

ebpf.c:3:10: fatal error: 'uapi/linux/ptrace.h' file not found
    3 | #include <uapi/linux/ptrace.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
1 error generated.

I have installed `linux-lts-headers`, and even reinstalled `linux-lts`
I have these packages: `bpf`, `bcc-tools`, `bcc-libbpf-tools`, `libbpf`

❯ uname -r
6.12.61-1-lts

❯ gcc --version
gcc (GCC) 15.2.1 20251112
Copyright (C) 2025 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Last edited by classikh (2026-01-06 06:51:20)

Offline

#2 2026-01-06 06:50:43

classikh
Member
Registered: 2023-06-13
Posts: 45

Re: [SOLVED] Cannot find 'uapi/linux/ptrace.h'

Offline

Board footer

Powered by FluxBB