Not sure if this mailing list is the appropriate place for this, as I am
new to this community, but here are my thoughts:

How did you install BCC? I had a similar issue on Ubuntu  when I had
installed a source version of bcc and also the package version and mixing
the python scripts for one with the library for the other.

I also just checked out the /usr/lib/x86_64-linux-gnu/libbcc.so on my
system (installed via the package) and it does not have any symbols
matching "error_category", but the one I built from source does have those
symbols.

The way I solved the problem was to call the scripts with LD_PRELOAD and
PYTHONPATH set appropriately.
I did not install into /usr what I built from source , so I just point
LD_PRELOAD and PYTHONPATH to the appropriate places in the build folder
when I call the scripts and want to use the from-source version, e.g.

sudo LD_PRELOAD=/path/to/bcc/build/src/cc/libbcc.so
> PYTHONPATH=/path/to/bcc/src/python <your script>


Hope this helps
Kyle

On Thu, Jul 28, 2016 at 3:52 AM, Nan Xiao via iovisor-dev <
[email protected]> wrote:

> Hi all,
>
> I want to try BPF on my Debian box, so I upgrade kernel to 4.7.0 first:
>
> # uname -a
>> Linux debian 4.7.0 #1 SMP Thu Jul 28 02:09:30 EDT 2016 x86_64 GNU/Linux
>
>
> Then I follow Ubuntu part
> <https://github.com/iovisor/bcc/blob/master/INSTALL.md> to install BCC,
> and all seems OK. But executing hello_world.py reports following error:
>
> # /usr/share/bcc/examples/hello_world.py
>> Traceback (most recent call last):
>>   File "/usr/share/bcc/examples/hello_world.py", line 9, in <module>
>>     from bcc import BPF
>>   File "/usr/lib/python2.7/dist-packages/bcc/__init__.py", line 27, in
>> <module>
>>     from .libbcc import lib, _CB_TYPE, bcc_symbol
>>   File "/usr/lib/python2.7/dist-packages/bcc/libbcc.py", line 17, in
>> <module>
>>     lib = ct.CDLL("libbcc.so.0", use_errno=True)
>>   File "/usr/lib/python2.7/ctypes/__init__.py", line 365, in __init__
>>     self._handle = _dlopen(self._name, mode)
>> OSError: /usr/lib/x86_64-linux-gnu/libbcc.so.0: undefined symbol:
>> _ZNSt14error_categoryC2Ev
>
>
> Could anyone help to give some comments on this issue?
> Thanks very much in advance!
>
> Best Regards
> Nan Xiao
>
> _______________________________________________
> iovisor-dev mailing list
> [email protected]
> https://lists.iovisor.org/mailman/listinfo/iovisor-dev
>
>
_______________________________________________
iovisor-dev mailing list
[email protected]
https://lists.iovisor.org/mailman/listinfo/iovisor-dev

Reply via email to