singe / ebpf-docker-for-mac

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

Error running hello_world.py #4

Open freemanpolys opened 2 years ago

freemanpolys commented 2 years ago

I run the python program in the image but it is failing. Kernel header is not found :

root@46a12dcd4efd:~# 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>
evanrolfe commented 1 year ago

@freemanpolys did you ever find a solution to this?

iamshreeram commented 11 months ago

@singe , @freemanpolys , @evanrolfe - Any luck on solving the above issue?

This code base isn't working on macOS.