# Problem with broccoli-python

**URL:** <https://community.zeek.org/t/problem-with-broccoli-python/2883>\
**Category:** Zeek\
**Created:** [November 4, 2013, 11:18pm UTC](https://community.zeek.org/t/problem-with-broccoli-python/2883 "2013-11-04T23:18:32Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rosebraugh\_Connar](https://avatars.discourse-cdn.com/v4/letter/r/41988e/32.png) [@Rosebraugh\_Connar](https://community.zeek.org/u/Rosebraugh_Connar)\
**Post date:** [November 4, 2013, 11:18pm UTC](https://community.zeek.org/t/problem-with-broccoli-python/2883/1 "2013-11-04T23:18:32Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Siwek\_Jon](https://avatars.discourse-cdn.com/v4/letter/s/90db22/32.png) [@Siwek\_Jon](https://community.zeek.org/u/Siwek_Jon)\
**Post date:** [November 5, 2013, 4:18pm UTC](https://community.zeek.org/t/problem-with-broccoli-python/2883/2 "2013-11-05T16:18:46Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Mike\_Sconzo](https://avatars.discourse-cdn.com/v4/letter/m/d6d6ee/32.png) [@Mike\_Sconzo](https://community.zeek.org/u/Mike_Sconzo)\
**Post date:** [November 5, 2013, 5:06pm UTC](https://community.zeek.org/t/problem-with-broccoli-python/2883/3 "2013-11-05T17:06:43Z")

</div>

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/

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/zeek/original/1X/f09d732bc2cc7c7cc7e35db67cf4e1d5233ce7a7.png) [@system](https://community.zeek.org/u/system)\
**Post date:** [May 6, 2022, 3:41pm UTC](https://community.zeek.org/t/problem-with-broccoli-python/2883/4 "2022-05-06T15:41:21Z")

</div>

Closed on May 6, 2022, 3:41pm UTC


