fatal error: pcap.h: No such file or directory

fatal error: pcap.h: No such file or directory

Q: When compiling the C file, I found no pcap.h header file
A: Go to this website to download the libpcap compressed package

http://www.tcpdump.org/#latest-release

Then after decompression, cd libpcap-1.9.0

cd libpcap-1.9.0
./configure

Then copy libcap-1.9.1 / pcap / to / usr / include /
Insert picture description here

sudo cp pcap.h /usr/include/
Published 22 original articles · won 25 · views 3660

Guess you like

Origin blog.csdn.net/wuyou1995/article/details/104742424