oremanj / python-netfilterqueue

Python bindings for libnetfilter_queue
MIT License
250 stars 96 forks source link

NetfilterQueue not installing #69

Closed riddhiman1 closed 2 years ago

riddhiman1 commented 3 years ago

I have tried all of the listed methods, **Cloning into 'python-netfilterqueue'... git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists. ** Guys you need to update, now it is python 3.9 . Please do something it is urgent.

winterrdog commented 3 years ago

I am experiencing the same issue with python3.9 I don't know why it is happening. This is the reason i see in the traceback, it maybe that a certain C header file is missing: **netfilterqueue.c:437:10: fatal error: libnfnetlink/linux_nfnetlink.h: No such file or directory 437 | #include "libnfnetlink/linux_nfnetlink.h" | ^~~~~~~~ compilation terminated. error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1

ERROR: Failed building wheel for netfilterqueue**

This happened when i used "pip3 install netfilterqueue" to install it

borisarloff commented 3 years ago

The problem is with CPython for Python 3.9 changes. PyTypeObject.tp_print was removed but not from the netfilterqueue.c file, hence it cannot compile crrectly under Python 3.9. You need to revert to Python 3.8 or patch the netfilterqueue.c file.

oremanj commented 2 years ago

@winterrdog You need to install the libnetfilter_queue development headers. On Debian or Ubuntu this is apt-get install libnetfilter-queue-dev, not sure the appropriate package on other distros.

@borisarloff I just pushed an update that fixes compilation on 3.9 (and 3.10). It will be released to PyPI shortly.

@riddhiman1 The URL in the readme was outdated; I fixed it, try now. https://github.com/oremanj/python-netfilterqueue