Skip to content

Commit 9b6b05a

Browse files
seehearfeelyonghong-song
authored andcommitted
FAQ: Update LD_LIBRARY_PATH and PYTHONPATH
libbcc.so is actually installed to /usr/lib64 instead of /usr/local/lib in my computer system: $ find /usr -name libbcc.so /usr/lib64/libbcc.so And also we can find out bcc-python: $ find /usr/lib -name bcc /usr/lib/python2.7/site-packages/bcc It is better to use one line command to export environment variable LD_LIBRARY_PATH and PYTHONPATH. Signed-off-by: Tiezhu Yang <[email protected]>
1 parent f604646 commit 9b6b05a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

FAQ.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ Q: hello_world.py fails with:
88
OSError: libbcc.so: cannot open shared object file: No such file or directory
99
A: make sure to 'make install' and add the directory
1010
where libbcc.so was installed into your LD_LIBRARY_PATH
11-
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
11+
export LD_LIBRARY_PATH=$(dirname `find /usr -name libbcc.so`):$LD_LIBRARY_PATH
1212

1313
Q: hello_world.py fails with:
1414
ImportError: No module named bcc
1515
A: checkout "sudo make install" output to find out bpf package installation site,
1616
add it to the PYTHONPATH env variable before running the program.
17-
sudo bash -c 'PYTHONPATH=/usr/lib/python2.7/site-packages python examples/hello_world.py'
17+
export PYTHONPATH=$(dirname `find /usr/lib -name bcc`):$PYTHONPATH
1818

1919
Q: hello_world.py still fails with:
2020
bpf: Operation not permitted

0 commit comments

Comments
 (0)