Search code examples
libpcappacket-sniffers

Brew install libpcap does not provide binaries


Stupid question: I'm trying to install libpcap on my macOS (Big Sur) using brew. I've executed "brew install libpcap". Now, I would imagine that I could now run libpcap out of the box, but it tell me that libpcap: command not found. brew tells me this:

If you need to have libpcap first in your PATH, run: echo 'export PATH="/usr/local/opt/libpcap/bin:$PATH"' >> /Users/michal/.bash_profile

Now I've checkd that it's in the bash_profile, and it doesn't work. So I check the actual package, and in it, there is no binary file. The binary is also not in usr/local/bin.

brew furthermore tells me that

libpcap is keg-only, which means it was not symlinked into /usr/local because macOS already provides this software and installing another version in parallel can cause all kinds of trouble.

but I don't really know what this means, seeing that I cannot find it anywhere.

What is going on here? Where is it installed, and how do I run that program?


Solution

  • From TCPDUMP:

    ... libpcap, a portable C/C++ library for network traffic capture.

    libpcap is a library, not a program.