Commit 66695702 authored by Yonghong Song's avatar Yonghong Song

Add an FAQ entry to provide workaround for potential bpf pkg installation problem.

Signed-off-by: default avatarYonghong Song <yhs@plumgrid.com>
parent b25d3b80
...@@ -10,6 +10,12 @@ A: make sure to 'make install' and add the directory ...@@ -10,6 +10,12 @@ A: make sure to 'make install' and add the directory
where libbpfprog.so was installed into your LD_LIBRARY_PATH where libbpfprog.so was installed into your LD_LIBRARY_PATH
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
Q: hello_world.py fails with:
ImportError: No module named bpf
A: checkout "sudo make install" output to find out bpf package installation site,
add it to the PYTHONPATH env variable before running the program.
sudo bash -c 'PYTHONPATH=/usr/lib/python2.7/site-packages python examples/hello_world.py'
Q: hello_world.py still fails with: Q: hello_world.py still fails with:
bpf: Operation not permitted bpf: Operation not permitted
Exception: Failed to load BPF program hello Exception: Failed to load BPF program hello
......
...@@ -73,8 +73,6 @@ sudo python examples/hello_world.py ...@@ -73,8 +73,6 @@ sudo python examples/hello_world.py
``` ```
Change `CMAKE_PREFIX_PATH` if llvm is installed elsewhere. Change `CMAKE_PREFIX_PATH` if llvm is installed elsewhere.
Change CMAKE_INSTALL_PREFIX to /usr/local if your python package installation
is under /usr/local install /usr.
### Cleaning up ### Cleaning up
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment