когда я пытаюсь установить netfilterqueue с помощью pip, это происходит

Когда я пытаюсь установить netfilterqueue на свою машину kali, это случилось. Я пытаюсь установить с помощью apt-get install build-essential python-dev libnetfilter-queue-dev, и это не изменит этого огромного количества ошибок. пожалуйста, помогите мне...

┌──(root????kali)-[~]
└─# pip install netfilterqueue  

Collecting netfilterqueue
  Using cached NetfilterQueue-0.8.1.tar.gz (58 kB)
Building wheels for collected packages: netfilterqueue
  Building wheel for netfilterqueue (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5tpph7lv/netfilterqueue_3641f68e5ece48b99aca49109efdaa34/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5tpph7lv/netfilterqueue_3641f68e5ece48b99aca49109efdaa34/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-f9gtyz8b
       cwd: /tmp/pip-install-5tpph7lv/netfilterqueue_3641f68e5ece48b99aca49109efdaa34/
  Complete output (210 lines):
  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-3.9
  x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -g -ffile-prefix-map=/build/python3.9-RNBry6/python3.9-3.9.2=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.9 -c netfilterqueue.c -o build/temp.linux-x86_64-3.9/netfilterqueue.o
  netfilterqueue.c: In function ‘__pyx_f_14netfilterqueue_6Packet_set_nfq_data’:
  netfilterqueue.c:2150:68: warning: passing argument 2 of ‘nfq_get_payload’ from incompatible pointer type [-Wincompatible-pointer-types]
   2150 |   __pyx_v_self->payload_len = nfq_get_payload(__pyx_v_self->_nfa, (&__pyx_v_self->payload));

netfilterqueue.c:7092:25: warning: ‘_PyUnicode_get_wstr_length’ is deprecated [-Wdeprecated-declarations]
 7092 |                         (PyUnicode_GET_SIZE(**argname) != PyUnicode_GET_SIZE(key)) ? 1 :
      |                         ^
In file included from /usr/include/python3.9/unicodeobject.h:1026,
                 from /usr/include/python3.9/Python.h:97,
                 from netfilterqueue.c:4:
/usr/include/python3.9/cpython/unicodeobject.h:446:26: note: declared here
  446 | static inline Py_ssize_t _PyUnicode_get_wstr_length(PyObject *op) {
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
netfilterqueue.c: In function ‘__Pyx__ExceptionSave’:
netfilterqueue.c:7132:21: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
 7132 |     *type = tstate->exc_type;
      |                     ^~~~~~~~
      |                     curexc_type
netfilterqueue.c:7133:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
 7133 |     *value = tstate->exc_value;
      |                      ^~~~~~~~~
      |                      curexc_value
netfilterqueue.c:7134:19: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
 7134 |     *tb = tstate->exc_traceback;
      |                   ^~~~~~~~~~~~~
      |                   curexc_traceback
netfilterqueue.c: In function ‘__Pyx__ExceptionReset’:
netfilterqueue.c:7141:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
 7141 |     tmp_type = tstate->exc_type;
      |                        ^~~~~~~~
      |                        curexc_type
netfilterqueue.c:7142:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
 7142 |     tmp_value = tstate->exc_value;
      |                         ^~~~~~~~~
      |                         curexc_value
netfilterqueue.c:7143:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
 7143 |     tmp_tb = tstate->exc_traceback;
      |                      ^~~~~~~~~~~~~
      |                      curexc_traceback
netfilterqueue.c:7144:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
 7144 |     tstate->exc_type = type;
      |             ^~~~~~~~
      |             curexc_type
netfilterqueue.c:7145:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
 7145 |     tstate->exc_value = value;
      |             ^~~~~~~~~
      |             curexc_value
netfilterqueue.c:7146:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
 7146 |     tstate->exc_traceback = tb;
      |             ^~~~~~~~~~~~~
      |             curexc_traceback
netfilterqueue.c: In function ‘__Pyx__GetException’:
netfilterqueue.c:7201:24: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
 7201 |     tmp_type = tstate->exc_type;
      |                        ^~~~~~~~
      |                        curexc_type
netfilterqueue.c:7202:25: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
 7202 |     tmp_value = tstate->exc_value;
      |                         ^~~~~~~~~
      |                         curexc_value
netfilterqueue.c:7203:22: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
 7203 |     tmp_tb = tstate->exc_traceback;
      |                      ^~~~~~~~~~~~~
      |                      curexc_traceback
netfilterqueue.c:7204:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_type’; did you mean ‘curexc_type’?
 7204 |     tstate->exc_type = local_type;
      |             ^~~~~~~~
      |             curexc_type
netfilterqueue.c:7205:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_value’; did you mean ‘curexc_value’?
 7205 |     tstate->exc_value = local_value;
      |             ^~~~~~~~~
      |             curexc_value
netfilterqueue.c:7206:13: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘exc_traceback’; did you mean ‘curexc_traceback’?
 7206 |     tstate->exc_traceback = local_tb;
      |             ^~~~~~~~~~~~~
      |             curexc_traceback
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
----------------------------------------

ОШИБКА: команда выполнена с ошибкой со статусом выхода 1: / usr / bin / python3 -u -c 'import sys, setuptools, tokenize; sys.argv [0] = '' '/tmp/pip-install-5tpph7lv/netfilterqueue_3641f68e5ece48b99aca49109efdaa34/setup.py' ''; file = '' '/ tmp / pip-install-5tpph7lv / netfilterqueue_3641f68e5ece48b99aca49109efdaa34 / setup.py' ''; f = getattr (tokenize, '' 'open' '', open) ( файл); code = f.read (). replace ('' '\ r \ n' '', '' '\ n' ''); f.close (); exec (compile (code, файл, '' 'exec' '')) 'install --record /tmp/pip-record-t1tny384/install-record.txt --single-version-external-managed --compile - -install-headers /usr/local/include/python3.9/netfilterqueue Проверьте журналы на предмет полного вывода команды.

Может ли это сработать?


person ART    schedule 19.06.2021    source источник
comment
Есть несколько соответствующих дубликатов, но в результате вам нужно перестроить файлы C, которые были сгенерированы Cython.   -  person DavidW    schedule 19.06.2021
comment
См. Также github.com/kti/python-netfilterqueue/issues/53.   -  person DavidW    schedule 20.06.2021