Bcc: example run err

Created on 24 Jun 2019  路  1Comment  路  Source: iovisor/bcc

when i run

./hello_world.py 
 bash-1655  [001] ....  3172.380293: 0x00000001: Hello, World!

this example is ok. but i run ./disksnoop.py (https://github.com/iovisor/bcc/blob/master/examples/tracing/disksnoop.py) an error happend

./disksnoop.py
Traceback (most recent call last):
  File "./disksnoop.py", line 15, in <module>
    from bcc.utils import printb
ImportError: cannot import name printb

os version:

uname -a
Linux ubuntu-bionic 4.15.0-52-generic #56-Ubuntu SMP Tue Jun 4 22:49:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

bpfcc version:

bpfcc-tools/bionic,now 0.5.0-5ubuntu1 all [installed]

Most helpful comment

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4052245BD4284CDD
echo "deb https://repo.iovisor.org/apt/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/iovisor.list
sudo apt-get update
sudo apt-get install bcc-tools libbcc-examples linux-headers-$(uname -r)

fixed

>All comments

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4052245BD4284CDD
echo "deb https://repo.iovisor.org/apt/$(lsb_release -cs) $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/iovisor.list
sudo apt-get update
sudo apt-get install bcc-tools libbcc-examples linux-headers-$(uname -r)

fixed

Was this page helpful?
0 / 5 - 0 ratings

Related issues

woodliu picture woodliu  路  8Comments

ahrens picture ahrens  路  7Comments

banh-gao picture banh-gao  路  8Comments

a0viedo picture a0viedo  路  7Comments

markdrayton picture markdrayton  路  3Comments