当你进入
apt-get install build-essential python-dev libnetfilter-queue-dev
这就是它所提供的
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
python2-dev python2 python-dev-is-python3
E: Package 'python-dev' has no installation candidate
在
pip install NetfilterQueue
问题
Collecting NetfilterQueue
Using cached NetfilterQueue-1.0.0.tar.gz (87 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: NetfilterQueue
Building wheel for NetfilterQueue (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for NetfilterQueue (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [30 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-cpython-39
creating build/lib.linux-x86_64-cpython-39/netfilterqueue
copying netfilterqueue/__init__.py -> build/lib.linux-x86_64-cpython-39/netfilterqueue
copying netfilterqueue/_version.py -> build/lib.linux-x86_64-cpython-39/netfilterqueue
running egg_info
writing NetfilterQueue.egg-info/PKG-INFO
writing dependency_links to NetfilterQueue.egg-info/dependency_links.txt
writing top-level names to NetfilterQueue.egg-info/top_level.txt
reading manifest file 'NetfilterQueue.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
adding license file 'LICENSE.txt'
writing manifest file 'NetfilterQueue.egg-info/SOURCES.txt'
copying netfilterqueue/_impl.pxd -> build/lib.linux-x86_64-cpython-39/netfilterqueue
copying netfilterqueue/_impl.pyi -> build/lib.linux-x86_64-cpython-39/netfilterqueue
copying netfilterqueue/_impl.pyx -> build/lib.linux-x86_64-cpython-39/netfilterqueue
copying netfilterqueue/py.typed -> build/lib.linux-x86_64-cpython-39/netfilterqueue
running build_ext
building 'netfilterqueue._impl' extension
creating build/temp.linux-x86_64-cpython-39
creating build/temp.linux-x86_64-cpython-39/netfilterqueue
x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -I/usr/include/python3.9 -c netfilterqueue/_impl.c -o build/temp.linux-x86_64-cpython-39/netfilterqueue/_impl.o
netfilterqueue/_impl.c:718:10: fatal error: libnfnetlink/linux_nfnetlink.h: No such file or directory
718 | #include "libnfnetlink/linux_nfnetlink.h"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for NetfilterQueue
Failed to build NetfilterQueue
ERROR: Could not build wheels for NetfilterQueue, which is required to install pyproject.toml-based projects
python的版本:3.9.10 我读到这是可能的,因为版本需要降级。如何降低- 没有找到。
对于第一个错误。这是支持日志以及不再存在或受支持的内容的描述。
python-dev
相反,它使用python
至于第二个错误。尽量不要使用全局
pip/pip3
. 使用显式解释器python
最好使用虚拟环境并在其中工作venv
也尝试从源安装
git