在Ubuntu上python2.7安装pcapy

How To Install “python-pcapy” Package on Ubuntu

在Ubuntu上python2.7安装pcapy

1
pip install pcapy

报错

1
2
3
4
5
6
7
pcapdumper.cc:11:10: fatal error: pcap.h: No such file or directory
#include <pcap.h>
^~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for pcapy

Quick Install Instructions of python-pcapy on Ubuntu Server. It’s Super Easy! simply click on Copy button to copy the command and paste into your command line terminal using built-in APT package manager.

See below for quick step by step instructions of SSH commands, Copy/Paste to avoid miss-spelling or accidently installing a different packag

Step 1

1
sudo apt-get update -y

Step 2

1
sudo apt-get install -y python-pcapy