0

I would like to use bgpstream. I installed it. I test it using BGPReader in command line and everything seems to work correctly.

Now I would like to install pybgpstream to use the tool in my python scripts. To install pybgpstream you first have to install bgpstream. As said above it is already installed.

Here is what happend when I try to install it:

$ pip3 install pybgpstream
Collecting pybgpstream
  Using cached https://files.pythonhosted.org/packages/1d/8b/a4ae40e2e822635b0477c763fdfc6fe8cfa302dfae9410706d146f364390/pybgpstream-2.0.0.tar.gz
Collecting python-dateutil (from pybgpstream)
  Using cached https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl
Collecting six>=1.5 (from python-dateutil->pybgpstream)
  Using cached https://files.pythonhosted.org/packages/65/26/32b8464df2a97e6dd1b656ed26b2c194606c16fe163c695a992b36c11cdf/six-1.13.0-py2.py3-none-any.whl
Building wheels for collected packages: pybgpstream
  Running setup.py bdist_wheel for pybgpstream ... error
  Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-3huxqvfq/pybgpstream/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpeev3myvupip-wheel- --python-tag cp36:
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.linux-x86_64-3.6
  creating build/lib.linux-x86_64-3.6/pybgpstream
  copying pybgpstream/__init__.py -> build/lib.linux-x86_64-3.6/pybgpstream
  copying pybgpstream/pybgpstream.py -> build/lib.linux-x86_64-3.6/pybgpstream
  running build_ext
  building '_pybgpstream' extension
  creating build/temp.linux-x86_64-3.6
  creating build/temp.linux-x86_64-3.6/src
  x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c src/_pybgpstream_version.c -o build/temp.linux-x86_64-3.6/src/_pybgpstream_version.o
  src/_pybgpstream_version.c:30:3: error: #error "pybgpstream requires libbgpstream 2.0.0 or later"
    #error "pybgpstream requires libbgpstream 2.0.0 or later"
     ^~~~~
  error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

  ----------------------------------------
  Failed building wheel for pybgpstream
  Running setup.py clean for pybgpstream
Failed to build pybgpstream
Installing collected packages: six, python-dateutil, pybgpstream
  Running setup.py install for pybgpstream ... error
    Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-3huxqvfq/pybgpstream/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-54dwua9s-record/install-record.txt --single-version-externally-managed --compile --user --prefix=:
    running install
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-3.6
    creating build/lib.linux-x86_64-3.6/pybgpstream
    copying pybgpstream/__init__.py -> build/lib.linux-x86_64-3.6/pybgpstream
    copying pybgpstream/pybgpstream.py -> build/lib.linux-x86_64-3.6/pybgpstream
    running build_ext
    building '_pybgpstream' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/src
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c src/_pybgpstream_version.c -o build/temp.linux-x86_64-3.6/src/_pybgpstream_version.o
    src/_pybgpstream_version.c:30:3: error: #error "pybgpstream requires libbgpstream 2.0.0 or later"
      #error "pybgpstream requires libbgpstream 2.0.0 or later"
       ^~~~~
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-3huxqvfq/pybgpstream/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-54dwua9s-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-3huxqvfq/pybgpstream/

It fact it tells me that he cannot find the "libbgpstream 2.0.0". It is actually in /usr/local/lib and is called libbgpstream.so.2.0.0 !

I already did like said in https://bgpstream.caida.org/docs/install/pybgpstream:

LD_LIBRARY_PATH=/usr/local/lib/libbgpstream.so.2.0.0

Thanks you for the reading. Could you help me ?

Regards,

Sagawill
  • 21
  • 3
  • install the following using `pip3` `python3-dev, build-essential ,libssl-dev, libffi-dev,libxml2-dev, libxslt1-dev, zlib1g-dev` and then try installing – αԋɱҽԃ αмєяιcαη Nov 26 '19 at 15:15
  • Did you check if the `wandiocat` command works from the terminal? You may have an incorrectly configured `LD_LIBRARY_PATH` (If I remember correctly, it should only be the name of the directory, and should look more like `LD_LIBRARY_PATH="/INSTALL/PATH/lib:$LD_LIBRARY_PATH"`) – Riet Nov 26 '19 at 15:16
  • `export LD_LIBRARY_PATH=/usr/local/lib` – phd Nov 26 '19 at 15:41
  • It did install all the package. Wandiocat is installed correctly I tried it by using it in the terminalt "$ wandiocat http://google.com". I did "$ export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib" and "export LD_LIBRARY_PATH=/usr/local/lib" but doesn't work either. Thanks for your responses. – Sagawill Nov 27 '19 at 09:57

1 Answers1

0

I finally changed my OS (ubuntu 18.04) to kali linux to have a fresh os. Everything is working now.

Regards,

Sagawill
  • 21
  • 3