Hi all, Greetings from me!
I install the newest Linux kernel 4.8.1 on CentOS 7, and want to try BPF feature. When I execute bcc/examples/hello_world.py, the following error is generated: # ./hello_world.py chdir(/lib/modules/4.8.1/build): No such file or directory Traceback (most recent call last): File "./hello_world.py", line 11, in <module> BPF(text='int kprobe__sys_clone(void *ctx) { bpf_trace_printk("Hello, World!\\n"); return 0; }').trace_print() File "/usr/lib/python2.7/site-packages/bcc/__init__.py", line 205, in __init__ raise Exception("Failed to compile BPF module %s" % src_file) Exception: Failed to compile BPF module I check the /lib/modules/4.8.1/ directory: lrwxrwxrwx. 1 root root 17 Oct 14 11:29 build -> /root/linux-4.8.1 lrwxrwxrwx. 1 root root 17 Oct 14 11:29 source -> /root/linux-4.8.1 The /root/linux-4.8.1 is the folder which is used to build 4.8.1 kernel, since it occupies too much space, I delete it after installing. So to compile BPF module, does it mean I need to recover the linux-4.8.1 source code and build it again? Thanks very much in advance! Best Regards Nan Xiao
_______________________________________________ iovisor-dev mailing list iovisor-dev@lists.iovisor.org https://lists.iovisor.org/mailman/listinfo/iovisor-dev