Could NOT find PCAP (missing: PCAP_LIBRARIES PCAP_INCLUDE_DIRS)

Could NOT find PCAP (missing: PCAP_LIBRARIES PCAP_INCLUDE_DIRS)

在安装PCL时会有这样的错误:

Could NOT find PCAP (missing: PCAP_LIBRARIES PCAP_INCLUDE_DIRS)

1.下载pcap包,地址:http://www.tcpdump.org/#latest-release

$ tar -zxvf libpcap-1.9.0.tar.gz

$ cd libpcap-1.9.0

$ ./configure

$ make -j8

$ sudo make install

2.如果在./configure时出现:

configure: error: Neither flex nor lex was found.

解决办法:

$ sudo apt-get install flex bison

Done!

原文地址:https://www.cnblogs.com/nanmi/p/12840793.html