Problem with broccoli-python

Hello All,

I went through the install for broccoli-python, and when I try and do “from broccoli import *” from my home directory, I get the error :

Traceback (most recent call last):

File “”, line 1, in

File “/usr/local/lib/python2.7/dist-packages/broccoli.py”, line 6, in

from _broccoli_intern import *

ImportError: libbroccoli.so.5: cannot open shared object file: No such file or directory

However, when I run this command from /usr/local/lib/python, the command works just fine. Does anyone know what files are supposed to end up in what directories?

Thanks,

Connar Rosebraugh

Intern, Security Operations

NICUSA, Inc.

The default install prefix for broccoli if installed on its own is /usr/local. But if broccoli is installed as part of the full bro package, the default install prefix is /usr/local/bro. If you don’t see the shared library indicated in the error message in the lib subdir of either place, please give more details on how you configured/built/installed broccoli and the python bindings.

If you do find libbroccoli.so in your manual search for it, then it seems like the run-time linker just needs help finding it. And that is typically resolved by either setting the LD_LIBRARY_PATH env var or doing stuff with /etc/ld.so.conf and `ldconfig` if you’re on linux — the man pages for “ld-linux.so” and “ldconfig” are good to review here.

- Jon

Showing our setup to verify what Jon said.

On ubuntu (built for install in /opt):
root@host:# cat /etc/ld.so.conf.d/bro.conf
/opt/bro/lib/

(don't forget to run ldconfig) after the bro.conf file

The other thing we did was add a .pth file to our python venv:
root@host:# cat /opt/python/venv/lib/python2.7/site-packages/bro.pth
/opt/bro/lib/broctl/