Pcap develop package is needed in compiling tcpdump

On a fresh VoidLinux, I compiled tcpdump source code and met following errors during configuration:

# ../configure CFLAGS='-g -O0'
......
checking for local pcap library... not found
checking for pkg-config... no
checking for pcap-config... no
checking for main in -lpcap... no
configure: error: see the INSTALL doc for more info

I was sure libpcap was already installed. After some investigating, I found the root cause was libpcap-devel was needed:

# xbps-install -Suv libpcap-devel
......

Then the issue was fixed.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.