Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
NobinPegasus opened this issue Apr 25, 2024 · 0 comments
Open

Comments

@NobinPegasus
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant