安装satori 时需要安装pcapy 解决linux Centos 无法安装 python pcapy的问题。

安装satori 时需要安装pcapy
一开始是以为gcc 有问题,注意看提示是没有
python.h 没有头文件,编译不通过

yum install libpcap-devel
yum install python3-devel py3 开发包。记得是要装py3 .python-devel 装的是2。7的版本。

原始报错信息:

[root@localhost satori-master]# pip3 install pcapy
WARNING: Running pip install with root privileges is generally not a good idea. Try pip3 install --user instead.
Collecting pcapy
Downloading http://pypi.doubanio.com/packages/b0/68/b49e008f9e2b5ab727fb4b820c2e7d0914bd8dacb3c2d668a36b6e5d8991/pcapy-0.11.4.tar.gz
Installing collected packages: pcapy
Running setup.py install for pcapy … error
Complete output from command /usr/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-fv72a78n/pcapy/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-3n6ogg3_-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_ext
building ‘pcapy’ extension
creating build
creating build/temp.linux-x86_64-3.6
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.6m -c pcapdumper.cc -o build/temp.linux-x86_64-3.6/pcapdumper.o
pcapdumper.cc:10:20: 致命错误:Python.h:没有那个文件或目录
#include <Python.h>
^
编译中断。
error: command ‘gcc’ failed with exit status 1

Command “/usr/bin/python3 -u -c “import setuptools, tokenize;file=’/tmp/pip-build-fv72a78n/pcapy/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-3n6ogg3_-record/install-record.txt --single-version-externally-managed --compile” failed with error code 1 in /tmp/pip-build-fv72a78n/pcapy/

成功:
[root@localhost satori-master]# pip3 install pcapy
WARNING: Running pip install with root privileges is generally not a good idea. Try pip3 install --user instead.
Collecting pcapy
Downloading http://pypi.doubanio.com/packages/b0/68/b49e008f9e2b5ab727fb4b820c2e7d0914bd8dacb3c2d668a36b6e5d8991/pcapy-0.11.4.tar.gz
Installing collected packages: pcapy
Running setup.py install for pcapy … done
Successfully installed pcapy-0.11.4

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值