source code checkinstall failure

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
sherv
Posts: 5
Joined: Wed Aug 15, 2012 4:42 am

source code checkinstall failure

Post by sherv »

Good day.

I'm trying to install Nagios 3.4.1 from source in a Debian Linux with checkinstall, but it comes with failure.
Here's a 'configure' summary:

Code: Select all

*** Configuration summary for nagios 3.4.1 05-11-2012 ***:

 General Options:
 -------------------------
        Nagios executable:  nagios
        Nagios user/group:  nagios,nagios
       Command user/group:  nagios,nagios
            Embedded Perl:  yes, with caching
             Event Broker:  yes
        Install ${prefix}:  /usr/local/nagios
                Lock file:  ${prefix}/var/nagios.lock
   Check result directory:  ${prefix}/var/spool/checkresults
           Init directory:  /etc/init.d
  Apache conf.d directory:  /etc/apache2/conf.d
             Mail program:  /usr/bin/mail
                  Host OS:  linux-gnu

 Web Interface Options:
 ------------------------
                 HTML URL:  http://localhost/nagios/
                  CGI URL:  http://localhost/nagios/cgi-bin/
 Traceroute (used by WAP):  /usr/bin/traceroute

'make all' comes with two minor warning, nothing serious:

Code: Select all

utils.c: In function ‘file_uses_embedded_perl’:
utils.c:3115: warning: unused variable ‘use_epn’

Code: Select all

cgiutils.c: In function ‘include_ssi_files’:
cgiutils.c:1500: warning: unused variable ‘x’
But when I finally issue sudo checkinstall make install it comes with this:

Code: Select all

Installing with make install...

========================= Installation results ===========================
cd ./base && make install
make[1]: Entering directory `/home/user/nagios/base'
make install-basic
make[2]: Entering directory `/home/user/nagios/base'
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/bin
/usr/bin/install -c -m 774 -o nagios -g nagios nagios /usr/local/nagios/bin
/usr/bin/install -c -m 774 -o nagios -g nagios nagiostats /usr/local/nagios/bin
make[2]: Leaving directory `/home/user/nagios/base'
make strip-post-install
make[2]: Entering directory `/home/user/nagios/base'
/usr/bin/strip /usr/local/nagios/bin/nagios
/usr/bin/strip:/usr/local/nagios/bin/nagios: could not create temporary file to hold stripped copy: No error
make[2]: *** [strip-post-install] Error 1
make[2]: Leaving directory `/home/user/nagios/base'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/home/user/nagios/base'
make: *** [install] Error 2

****  Installation failed. Aborting package creation.

Cleaning up...OK

Bye.
Did anyone had the same issue? Is there a way to fix this?

My system:

Code: Select all

Linux server 2.6.32-5-amd64 #1 SMP Sun May 6 04:00:17 UTC 2012 x86_64 GNU/Linux
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: source code checkinstall failure

Post by agriffin »

Do you have enough disk space to do the build? What does your output from 'df -h' look like?
sherv
Posts: 5
Joined: Wed Aug 15, 2012 4:42 am

Re: source code checkinstall failure

Post by sherv »

One of the first things I checked :)

Code: Select all

$ df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/srv-root   95G  1.8G   88G   2% /
tmpfs                 2.0G     0  2.0G   0% /lib/init/rw
udev                  2.0G  104K  2.0G   1% /dev
tmpfs                 2.0G     0  2.0G   0% /dev/shm
/dev/sda1             228M   16M  200M   8% /boot
Inodes are also ok:

Code: Select all

$ df -i
Filesystem            Inodes   IUsed   IFree IUse% Mounted on
/dev/mapper/srv-root    6.0M     49K    6.0M    1% /
tmpfs                   496K       5    496K    1% /lib/init/rw
udev                    495K     524    495K    1% /dev
tmpfs                   496K       1    496K    1% /dev/shm
/dev/sda1               122K     222    122K    1% /boot
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: source code checkinstall failure

Post by agriffin »

A google search turned up some other people who got this error message and it turned out to be a permissions issue. Are you sure you didn't forget to type out 'sudo'?
sherv
Posts: 5
Joined: Wed Aug 15, 2012 4:42 am

Re: source code checkinstall failure

Post by sherv »

agriffin wrote:A google search turned up some other people who got this error message and it turned out to be a permissions issue. Are you sure you didn't forget to type out 'sudo'?
No, I did not. Also, running "checkinstall make install" under root returns the same error.
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: source code checkinstall failure

Post by agriffin »

Do you have anything like SELinux, Tomoyo, or AppArmor on this system?
sherv
Posts: 5
Joined: Wed Aug 15, 2012 4:42 am

Re: source code checkinstall failure

Post by sherv »

agriffin wrote:Do you have anything like SELinux, Tomoyo, or AppArmor on this system?
No, it's running plain Debian 6.0, no security packages installed.
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: source code checkinstall failure

Post by mguthrie »

I'm noticing it trying to put files in the directories below, which don't match what you had with the configuration summary.

Code: Select all

make[2]: Leaving directory `/home/user/nagios/base'
make[1]: *** [install] Error 2
make[1]: Leaving directory `/home/user/nagios/base'
I'd try starting from the beginning with:

Code: Select all

sudo -i
./configure --disable-embedded-perl
make
make all
make install
sherv
Posts: 5
Joined: Wed Aug 15, 2012 4:42 am

Re: source code checkinstall failure

Post by sherv »

Nope, it's pretty much the same error.
mguthrie wrote:I'm noticing it trying to put files in the directories below, which don't match what you had with the configuration summary.
I don't understand why this is a concern? Package is compiled under users' "home" directory, and from there it's trying to install in the system. That's how I do this for... well, my whole Linux-life actually. Good old "wget, tar zxvf, ./configure && make && make install" routine :)

I think this is some fundamental problem with Debian's checkinstall system. I'm pretty sure you can reproduce the issue on a clean Debian 6.0 x86_64 installation.
And I'm also pretty sure, that Nagios will successfully install with 'sudo make install', but I want it to be embedded in package system for easier update/management, scince Nagios doesn't have 'make uninstall' directive.
Locked