iovisor / bcc

BCC - Tools for BPF-based Linux IO analysis, networking, monitoring, and more

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ImportError: cannot import name 'BPF' from 'bcc' (unknown location)

NobinPegasus opened this issue · comments

I have built bcc from source.
The directory where it was built was:
/home/pegasus_vm/Documents/eBPFShield/bcc/build
When I try to run python main.py -h
It throws the following error:
ImportError: cannot import name 'BPF' from 'bcc' (unknown location)
How to fix it?

I've also added bpf build to the path like this in ~/.bashrc:

bcctools=/home/pegasus_vm/Documents/eBPFShield/bcc/build/tools
bccexamples=/home/pegasus_vm/Documents/eBPFShield/bcc/build/examples
export PATH=$bcctools:$bccexamples:$PATH