make all command error while installing nagios

Today, I was installing Nagios 4.0.2 version through tarball and while installation I got the issue that is make[1]: *** No rule to make target `../include/locations.h’, needed by `nagios.o’. Stop.
The error occur after I hit the command make all . I have already installed gcc so the error was coming from some other dependency requirement

The below given is the reference of error which I found

[root@localhost nagios-4.0.2]# make all
cd ./base && make
make[1]: Entering directory `/root/nagios-4.0.2/base'
make[1]: *** No rule to make target `../include/locations.h', needed by `nagios.o'.  Stop.
make[1]: Leaving directory `/root/nagios-4.0.2/base'
make: *** [all] Error 2
[root@localhost nagios-4.0.2]#

The solution for this error is ,complete the given below steps

Step 1: Install perl

yum -y install perl perl-devel

Step 2: After installing perl again change to extracted Nagios Directory.And rerun the .configure command. After doing this issue is resolved

cd nagios-4.0.2

./configure --with-command-group=nagcmd

make all

13 thoughts on “make all command error while installing nagios”

  1. make[1]: Leaving directory `/root/Nagios/nagios-4.1.1/cgi’
    cd ./html && make
    make[1]: Entering directory `/root/Nagios/nagios-4.1.1/html’
    (cd angularjs && unzip -u angular-1.3.9.zip)
    /bin/sh: unzip: command not found
    make[1]: *** [all] Error 127
    make[1]: Leaving directory `/root/Nagios/nagios-4.1.1/html’
    make: *** [all] Error 2
    [root@ip-172-31-87-154 nagios-4.1.1]#

    Followed the article but still getting the error any suggestions please

    Reply
    • Hi Sneha,

      Install unzip command in your system. I got the reference from your given log sample.

      make[1]: Entering directory `/root/Nagios/nagios-4.1.1/html’
      (cd angularjs && unzip -u angular-1.3.9.zip)
      /bin/sh: unzip: command not found
      

      Regards
      Sharad

      Reply

Leave a Comment

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