Python Forum

Full Version: Failed Install NetfilterQueue
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello
I'm using Win 10 with Python 3.7, I want to instal NetfilterQueue lib but each time I've got this error message:

command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2

Help please.

I'm sorry , i must put it in the general discussion
(Mar-09-2019, 08:37 AM)Alamily Wrote: [ -> ]I'm using Win 10 with Python 3.7, I want to instal NetfilterQueue lib
It's a library that only work on Linux.
library use libnetfilterqueue which need Linux kernel to work.
I tried to install it on Linux, but I got the following message:

Downloading https://files.pythonhosted.org/packages/...8.1.tar.gz (58kB)
100% |████████████████████████████████| 61kB 157kB/s
Building wheels for collected packages: netfilterqueue
Running setup.py bdist_wheel for netfilterqueue ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-raUjgK/netfilterqueue/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/pip-wheel-bJBx1d --python-tag cp27:
running bdist_wheel
running build
running build_ext
skipping 'netfilterqueue.c' Cython extension (up-to-date)
building 'netfilterqueue' extension
creating build
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-AjKZhf/python2.7-2.7.15=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c netfilterqueue.c -o build/temp.linux-x86_64-2.7/netfilterqueue.o
netfilterqueue.c:437:10: fatal error: libnfnetlink/linux_nfnetlink.h: No such file or directory
#include "libnfnetlink/linux_nfnetlink.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Failed building wheel for netfilterqueue
Running setup.py clean for netfilterqueue
Failed to build netfilterqueue
Installing collected packages: netfilterqueue
Running setup.py install for netfilterqueue ... error
Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-raUjgK/netfilterqueue/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-record-nW4X9e/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
skipping 'netfilterqueue.c' Cython extension (up-to-date)
building 'netfilterqueue' extension
creating build
creating build/temp.linux-x86_64-2.7
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fdebug-prefix-map=/build/python2.7-AjKZhf/python2.7-2.7.15=. -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c netfilterqueue.c -o build/temp.linux-x86_64-2.7/netfilterqueue.o
netfilterqueue.c:437:10: fatal error: libnfnetlink/linux_nfnetlink.h: No such file or directory
#include "libnfnetlink/linux_nfnetlink.h"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-raUjgK/netfilterqueue/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-record-nW4X9e/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-raUjgK/netfilterqueue/
apt-get install build-essential python-dev libnetfilter-queue-dev

you need to install this lib before installing netfilterqueue