RPI install with snapcraft


theycallmevirgo@...
 

I installed on latest Raspbian (bullseye) with Snapcraft. However, when I tried to run hello_world.py with python3, I got 


modprobe: FATAL: Module kheaders not found in directory /lib/modules/5.10.63-v7+

Unable to find kernel headers. Try rebuilding kernel with CONFIG_IKHEADERS=m (mo                                                                 dule) or installing the kernel development package for your running kernel versi                                                                 on.

chdir(/lib/modules/5.10.63-v7+/build): No such file or directory

Traceback (most recent call last):

  File "/bcc/examples/./hello_world.py", line 12, in <module>

    BPF(text='int kprobe__sys_clone(void *ctx) { bpf_trace_printk("Hello, World!                                                                 \\n"); return 0; }').trace_print()

  File "/usr/lib/python3/dist-packages/bcc/__init__.py", line 364, in __init__

    raise Exception("Failed to compile BPF module %s" % (src_file or "<text>"))

Exception: Failed to compile BPF module <text>

I guess this means I have to rebuild kernel?

Thanks so much in advance

Joe

Join iovisor-dev@lists.iovisor.org to automatically receive all group messages.