Mac – Aircrack-ng Makefile error with ‘#include

installmacports

I'm trying to install Aircrack-ng on my MacBook but I've hit a brick wall.

First I tried with MacPorts as suggested on Aircrack's homepage but I found that some tools were missing like Airmon so instead I decided to try the more traditional way of installing the .tar that I downloaded from the homepage aswell.

Now running the command sudo make install Makefile produces the output:

/Applications/Xcode.app/Contents/Developer/usr/bin/make -C src all
sh ../autocfg gcc ..
gcc -g -W -Wall -O3  -mavx2 -DJOHN_AVX2 -pthread -D_FILE_OFFSET_BITS=64 -D_REVISION=0  -fstack-protector -Iinclude -DSIMD_CORE   -c -o aircrack-ng.o aircrack-ng.c
In file included from aircrack-ng.c:65:
./crypto.h:43:10: fatal error: 'openssl/hmac.h' file not found
#include <openssl/hmac.h>
         ^
1 error generated.
make[1]: *** [aircrack-ng.o] Error 1
make: *** [all] Error 2

Reading that, I see that it's missing the file hmac.h from the openssl folder so I tried to include it in the file the best I could (I have no idea what I'm doing I'm new to all this)

Here are the lines around where I added the include and the include itself:

AC_ROOT     = .
include     $(AC_ROOT)/common.mak
include     /opt/local/include/openssl/hmac.h

DOCFILES        = ChangeLog INSTALLING README LICENSE AUTHORS VERSION

Running the Makefile again I get the following:

/opt/local/include/openssl/hmac.h:1: *** missing separator.  Stop.

I have Googled the problem and seen loads of suggestions to fix this and that its' probably due to whitespaces but I've been unable to fix it. I've used tabs and no whitespaces.

Best Answer

You can use Homebrew to install it. This will install all the dependencies for you automatically.

brew install aircrack-ng