singe / ebpf-docker-for-mac

How to run eBPF on Docker for mac
82 stars 16 forks source link

chdir(/lib/modules/5.10.76-linuxkit/build): No such file or directory #2

Closed Jun10ng closed 2 years ago

Jun10ng commented 2 years ago
root@3d19bc07c1ed:~# python3 hello_world.py 
modprobe: FATAL: Module kheaders not found in directory /lib/modules/5.10.76-linuxkit
Unable to find kernel headers. Try rebuilding kernel with CONFIG_IKHEADERS=m (module)
chdir(/lib/modules/5.10.76-linuxkit/build): No such file or directory
Traceback (most recent call last):
  File "hello_world.py", line 14, in <module>
    b = BPF(text=prog)
  File "/usr/lib/python3/dist-packages/bcc/__init__.py", line 347, in __init__
    raise Exception("Failed to compile BPF module %s" % (src_file or "<text>"))
Exception: Failed to compile BPF module <text>
Jun10ng commented 2 years ago

I run docker on my macOS.