I was trying to install nagios core using source code on my centos 7 linux. When I’m using ‘make all’ command I got this error “make: *** No rule to make target ../include/locations.h, needed by `nagios.o’. Stop.” It seems like I have missed some installation prerequisite packages of nagios core. After a small research I found that I forgot to install perl and its development packages.
This is the error screen I got
# make all cd ./base && make make: Entering directory `/root/downloads/nagios-4.1.1/base' make: *** No rule to make target `../include/locations.h', needed by `nagios.o'. Stop. make: Leaving directory `/root/downloads/nagios-4.1.1/base' make: *** [all] Error 2
Install perl packages
yum install perl perl-deve unzip
unzip is required for extracting some packages while compilation.
Now make clean all and recompile from beginning.
make clean all
Hope this helps