... it's better to have good questions

Build pmacct on Mac OSX from source

2023-01-26 1 min read Monitoring Ronny Trommer

I need a way to generate real-world NetFlow data, and pmacct is a great tool that helped me with various things. I couldn’t find a precompiled package so I have compiled it from the source myself. To get it running on my MacBook Pro with Apple Silicon, I had to jump through a few hoops to get it running. Here is a quick guide to making it work for someone else, including my future self :)

Install some build dependencies using Homebrew.

brew install autoconf automake librdkafka

Clone the Git repository and change into the pmacct directory.

git clone
cd pmacct

Add the librdkafka header files to your search path.

export C_INCLUDE_PATH=/opt/homebrew/Cellar/librdkafka/2.0.2/include
export LIBRARY_PATH=/opt/homebrew/Cellar/librdkafka/2.0.2/lib

You need to adapt the version number, at the point in time, I got version 2.0.2 installed.

Run the configure and make commands to build the tool.


The binary files are src directory. If you want to install them run make install and they will be copied to /usr/local/bin. You need root permissions to do it.

You can run it now with ./pmacctd -f /path/to/your/pmacctd.conf.