ebpf-docker-for-mac icon indicating copy to clipboard operation
ebpf-docker-for-mac copied to clipboard

Error running hello_world.py

Open freemanpolys opened this issue 3 years ago • 2 comments

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>

freemanpolys avatar Mar 03 '22 13:03 freemanpolys

@freemanpolys did you ever find a solution to this?

evanrolfe avatar May 06 '23 15:05 evanrolfe

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

This code base isn't working on macOS.

iamshreeram avatar Oct 25 '23 16:10 iamshreeram