I am getting the following error when trying run the example hello_world.py.
Traceback (most recent call last):
  File "/usr/share/bcc/examples/hello_world.py", line 9, in <module>
    from bcc import BPF
ImportError: cannot import name BPF
I installed bcc from source (link).
I also installed both the python bcc bindings packages, python-bcc and python3-bcc but no luck.
I am running Ubuntu 18.04 and kernel version 4.15.0-117-generic.
What am I missing here?
In ubuntu 20.04, I execute the following command to fix it.
sudo apt-get install bpfcc-tools linux-headers-$(uname -r)
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With