Проблема с установкой python библиотеки NetfilterQueue на kali linux

Не могу установить библиотеку NetfilterQueue. Пробовал на версии python 3.7.4 и 3.6.4. На 3.7.4 не работает из-за слишком поздней версии, это понятно. На 3.6.4 пишу pip install NetfilterQueue - выдаёт ошибку ( pip install nfqp3 тоже самое выдает )

Collecting NetfilterQueue
  Using cached https://files.pythonhosted.org/packages/39/c4/8f73f70442aa4094b3c37876c96cddad2c3e74c058f6cd9cb017d37ffac0/NetfilterQueue-0.8.1.tar.gz
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-build-RC1XvM/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/tmpSnTVFBpip-wheel- --python-tag cp27:
  running bdist_wheel
  running build
  running build_ext
  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-j9xj4T/python2.7-2.7.14=. -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-build-RC1XvM/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-ay3uqL-record/install-record.txt --single-version-externally-managed --compile:
    running install
    running build
    running build_ext
    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-j9xj4T/python2.7-2.7.14=. -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-build-RC1XvM/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-ay3uqL-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-RC1XvM/NetfilterQueue/

Пробовал apt install python3-pip git libnfnetlink-dev libnetfilter-queue-dev - все равно выдает ошибку -

Reading package lists... Done
Building dependency tree       
Reading state information... Done
build-essential is already the newest version (12.4).
build-essential set to manually installed.
The following additional packages will be installed:
  libnfnetlink-dev libpython3-dev libpython3.6-dev pkg-config python3.6-dev
The following NEW packages will be installed:
  libnetfilter-queue-dev libnfnetlink-dev libpython3-dev libpython3.6-dev
  pkg-config python3-dev python3.6-dev
0 upgraded, 7 newly installed, 0 to remove and 424 not upgraded.
Need to get 3,093 kB/3,101 kB of archives.
After this operation, 16.7 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err:1 http://http.kali.org/kali kali-rolling/main amd64 pkg-config amd64 0.29-4+b1
  404  Not Found [IP: 192.99.200.113 80]
Err:2 http://http.kali.org/kali kali-rolling/main amd64 libnetfilter-queue-dev amd64 1.0.2-2
  404  Not Found [IP: 192.99.200.113 80]
Err:3 http://http.kali.org/kali kali-rolling/main amd64 libpython3.6-dev amd64 3.6.4-3
  404  Not Found [IP: 192.99.200.113 80]
Err:4 http://http.kali.org/kali kali-rolling/main amd64 libpython3-dev amd64 3.6.4-1
  404  Not Found [IP: 192.99.200.113 80]
Err:5 http://http.kali.org/kali kali-rolling/main amd64 python3.6-dev amd64 3.6.4-3
  404  Not Found [IP: 192.99.200.113 80]
Err:6 http://http.kali.org/kali kali-rolling/main amd64 python3-dev amd64 3.6.4-1
  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/p/pkg-config/pkg-config_0.29-4+b1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/libn/libnetfilter-queue/libnetfilter-queue-dev_1.0.2-2_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/p/python3.6/libpython3.6-dev_3.6.4-3_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/p/python3-defaults/libpython3-dev_3.6.4-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/p/python3.6/python3.6-dev_3.6.4-3_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/p/python3-defaults/python3-dev_3.6.4-1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

С sudo apt install python3-pip git libnfnetlink-dev libnetfilter-queue-dev похожая история -

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  pkg-config
The following NEW packages will be installed:
  libnetfilter-queue-dev libnfnetlink-dev pkg-config
0 upgraded, 3 newly installed, 0 to remove and 424 not upgraded.
Need to get 69.7 kB/77.9 kB of archives.
After this operation, 286 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Err:1 http://http.kali.org/kali kali-rolling/main amd64 pkg-config amd64 0.29-4+b1
  404  Not Found [IP: 192.99.200.113 80]
Err:2 http://http.kali.org/kali kali-rolling/main amd64 libnetfilter-queue-dev amd64 1.0.2-2
  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/p/pkg-config/pkg-config_0.29-4+b1_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Failed to fetch http://http.kali.org/kali/pool/main/libn/libnetfilter-queue/libnetfilter-queue-dev_1.0.2-2_amd64.deb  404  Not Found [IP: 192.99.200.113 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?

Пробовал скачивать архив с сайта https://pypi.org/project/NetfilterQueue/#files, разархивировал, запустил setup.py через python setup.py install -

running install
running build
running build_ext
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-j9xj4T/python2.7-2.7.14=. -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

Через github тоже не получается

Как это решать и есть ли какие-нибудь похожие на NetfilterQueue библиотеки, если решить не получится?


Ответы (2 шт):

Автор решения: em0ji

NetfilterQueue больше не поддерживается на Python 3 и выше. В данной ситуации требуется установить pip install virtualenv и использовать виртуальное окружение.

→ Ссылка
Автор решения: niccneimi
$ apt-get install build-essential python-dev libnetfilter-queue-dev

мне помогло на Ubuntu 20.04 Python3.9

→ Ссылка