【问题标题】:Error code (exit code 1) when installing netfilterqueue on macOS在 macOS 上安装 netfilterqueue 时出现错误代码(退出代码 1)
【发布时间】:2019-01-23 01:35:27
【问题描述】:

当我尝试通过 pip 为 python 安装模块 netfilterqueue 时,我收到错误:

“命令 "/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python -u -c "import setuptools,tokenize;file='/private/tmp/pip-install-Ut3XcJ/netfilterqueue/setup.py';f=getattr(tokenize, 'open', open)(文件);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" 安装 --record /private/tmp/pip-record-teUDXs/install-record.txt --single-version-externally-managed --compile" 失败,错误代码 1 在 /private/tmp/pip-install-Ut3XcJ/netfilterqueue /"

我安装了模块 scapy 没有任何问题,所以我很困惑为什么 netfilterqueue 没有安装。我目前使用的是 macOS High Sierra。

【问题讨论】:

    标签: macos pip


    【解决方案1】:

    根据their Github page 上的这些问题,macOS 不支持它。

    https://github.com/kti/python-netfilterqueue/issues/14:

    libnetfilterqueue 是仅限 Linux 的功能,因此您无法使用 在 Mac OS 上安装 python-netfilterqueue。

    https://github.com/kti/python-netfilterqueue/issues/2:

    抱歉,python-netfilterqueue 无法在 Mac 上运行,因为 nfqueue 仅适用于 Linux:http://www.netfilter.org/projects/libnetfilter_queue/index.html

    【讨论】:

      【解决方案2】:

      错误码1表示不允许操作,是授权问题。 在命令之前尝试使用 sudo: sudo pip install python-netfilterqueue

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2018-08-27
        • 1970-01-01
        • 1970-01-01
        • 2013-09-28
        • 2014-10-20
        • 1970-01-01
        • 1970-01-01
        • 2021-04-13
        相关资源
        最近更新 更多