BSD

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • Nagios Port - Installation problem (3.8)

    8 answers - 1272 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Hi all
    I've tried installing the Nagios (2.0b4p0) port chrooted but I get the
    following error when it comes to the last stage of the install:
    Installing nagios-2.0b4p0-chroot from
    /
    Can't install nagios-2.0b4p0-chroot because of conflicts (nagios-2.0b4p0)
    /usr/sbin/pkg_add:
    / error
    Error code 1
    Stop in /usr/ports/net/nagios/nagios (line 1902 of
    /).
    Error code 1
    Stop in /usr/ports/net/nagios (line 108 of
    /).
    I installed like so:
    # cd /usr/ports/net/nagios/
    # make flavor='chroot'
    # make install
    After reading a post I found on Google I tried:
    # cd /usr/ports/net/nagios/
    # make flavor='chroot'
    # cd nagios
    # make install
    Both options fail with the above error. All the dependenciess seemed to
    install K. I also tried without using the flavor='chroot' in the make cmd.
    The system is a GENERIC kernel base install with the ports tree
    installed and updated. The only other thing I have done to the system
    is install SSL certs for Apache.
    Can anyone suggest what I might be doing wrong? I don't mind either way
    whether I get a full chrooted install although it would be very nice!
    Thanks
  • No.1 | | 574 bytes | |

    07 December 2005 16:12 +0000, Simon H wrote:

    Installing nagios-2.0b4p0-chroot from
    /
    Can't install nagios-2.0b4p0-chroot because of conflicts
    (nagios-2.0b4p0)

    Looks like you've already got the non-chroot flavour installed,
    pkg_delete it first.

    ># make flavor='chroot'


    That's not how ports(7) says to do this (see the section headed FLAVRS
    if you actually want to build it yourself for some reason: otherwise,
    it's simpler to just use the provided packages).
  • No.2 | | 1236 bytes | |

    Stuart Henderson wrote:
    07 December 2005 16:12 +0000, Simon H wrote:

    >Installing nagios-2.0b4p0-chroot from
    >/
    >Can't install nagios-2.0b4p0-chroot because of conflicts
    >(nagios-2.0b4p0)


    Looks like you've already got the non-chroot flavour installed,
    pkg_delete it first.

    ># make flavor='chroot'


    That's not how ports(7) says to do this (see the section headed FLAVRS
    if you actually want to build it yourself for some reason: otherwise,
    it's simpler to just use the provided packages).

    Thanks for this Stuart. I tried it withe right way from the man page
    and it failed because the plugins dont support chroot flavor.

    So I cleaned everything up again and tried a normal make && make install
    and it still fails with the original message. This is even after the
    fact that I did a pkg_delete and cleaned the directories recommended
    after the pkg_delete.

    So any ideas why this would happen in a normal build of the port?

    I'll perhaps try to install the package instead of the port but I like
    installing from src where possible.

    Thanks again
  • No.3 | | 92 bytes | |

    cd /usr/ports/net/nagios/ && FLAVR=chroot make install clean-depends
    that should do it ;)
  • No.4 | | 1543 bytes | |

    07 December 2005 16:52 +0000, Simon H wrote:

    Thanks for this Stuart. I tried it withe right way from the man page
    and it failed because the plugins dont support chroot flavor.

    Plugins and the main software are in subdirectories
    (/usr/ports/net/nagios/nagios & /usr/ports/net/nagios/plugins), you can
    compile them separately, one with flavours, one without. But you don't
    need to, read on

    So I cleaned everything up again and tried a normal make && make
    install and it still fails with the original message. This is even
    after the fact that I did a pkg_delete and cleaned the directories
    recommended after the pkg_delete.

    So any ideas why this would happen in a normal build of the port?

    I'll perhaps try to install the package instead of the port but I
    like installing from src where possible.

    When you 'make install', the port is built, packages are created
    (you'll see them in /usr/ports/packages/) then installed. Packages
    for ftp sites and CDs are made this way too. For e.g. Nagios, well,
    take a look at /usr/ports/net/nagios/Makefile and see how it works

    Making the packages is done inside fake directories so multiple
    flavours don't conflict until they're actually installed.

    So, your current system probably has
    /* already built for both flavours of
    the port, and you can just pkg_add (this is all 'make install' does
    anyway: see for yourself with 'make -n install').
  • No.5 | | 598 bytes | |

    viq wrote:
    cd /usr/ports/net/nagios/ && FLAVR=chroot make install clean-depends
    that should do it ;)

    Thanks viq, but this still fails on the plugins install as they dont
    support chroot flavor aparently:

    Fatal: Unknown flavor: chroot (in net/nagios/plugins)
    (Possible flavors are: no_db no_ntp no_samba no_snmp). (in
    net/nagios/plugins)
    Error code 1

    Stop.
    Error code 1

    Stop in /usr/ports/net/nagios (line 108 of
    /).
    #

    Is there a way around this so the full install c/w plugins, etc all work
    in a chrooted environment?

    Thanks
  • No.6 | | 2433 bytes | |

    Stuart Henderson wrote:
    07 December 2005 16:52 +0000, Simon H wrote:

    >Thanks for this Stuart. I tried it withe right way from the man page
    >and it failed because the plugins dont support chroot flavor.


    Plugins and the main software are in subdirectories
    (/usr/ports/net/nagios/nagios & /usr/ports/net/nagios/plugins), you can
    compile them separately, one with flavours, one without. But you don't
    need to, read on

    >So I cleaned everything up again and tried a normal make && make
    >install and it still fails with the original message. This is even
    >after the fact that I did a pkg_delete and cleaned the directories
    >recommended after the pkg_delete.
    >>

    >So any ideas why this would happen in a normal build of the port?
    >>

    >I'll perhaps try to install the package instead of the port but I
    >like installing from src where possible.


    When you 'make install', the port is built, packages are created (you'll
    see them in /usr/ports/packages/) then installed. Packages for ftp
    sites and CDs are made this way too. For e.g. Nagios, well, take a look
    at /usr/ports/net/nagios/Makefile and see how it works

    Making the packages is done inside fake directories so multiple flavours
    don't conflict until they're actually installed.

    So, your current system probably has
    /* already built for both flavours of
    the port, and you can just pkg_add (this is all 'make install' does
    anyway: see for yourself with 'make -n install').

    I understand this and have tried just installing the chroot package
    manually also but nothing seems to be going in the right place
    (/var/www/nagios is empty after adding the chrooted package). I'm doing
    this in a VM so I'm reverting back to a snapshot which is just after
    updating the ports tree and starting again.

    What I dont understand is why the plugins dont require the chroot flavor
    and how they would work with nagios chrooted. Also, what about the
    dependencies such as GD and the likedo they all get chrooted
    automagically too and if not, how does it work?

    Is it really possible to get a full nagios implementation (inc. plugins)
    chrooted?

    Thanks
  • No.7 | | 867 bytes | |

    I understand this and have tried just installing the chroot package
    manually also but nothing seems to be going in the right place
    (/var/www/nagios is empty after adding the chrooted package). I'm doing
    this in a VM so I'm reverting back to a snapshot which is just after
    updating the ports tree and starting again.

    What I dont understand is why the plugins dont require the chroot flavor
    and how they would work with nagios chrooted. Also, what about the
    dependencies such as GD and the likedo they all get chrooted
    automagically too and if not, how does it work?

    Is it really possible to get a full nagios implementation (inc. plugins)
    chrooted?

    The plugins are not chrooted, there is no reason to do so. The main
    nagios daemon runs outside of Apache's chroot, hence, so do the
    plugins.

    Benny
  • No.8 | | 935 bytes | |

    Wednesday 07 December 2005 19:01, Simon H wrote:
    viq wrote:
    cd /usr/ports/net/nagios/ && FLAVR=chroot make install clean-depends
    that should do it ;)

    Thanks viq, but this still fails on the plugins install as they dont
    support chroot flavor aparently:

    Fatal: Unknown flavor: chroot (in net/nagios/plugins)
    (Possible flavors are: no_db no_ntp no_samba no_snmp). (in
    net/nagios/plugins)
    Error code 1

    Stop.
    Error code 1

    Stop in /usr/ports/net/nagios (line 108 of
    /).
    #

    Is there a way around this so the full install c/w plugins, etc all work
    in a chrooted environment?

    Ah. I don't have yet that much experience with ports, and didn't play with
    nagios, so i'm afraid the help will have to come from someone else. All i can
    help you with is that FLAVRS have to be capitalised, and you need to enter
    it on every line that has a make in it ;)

Re: Nagios Port - Installation problem (3.8)


max 4000 letters.
Your nickname that display:
In order to stop the spam: 0 + 9 =
QUESTION ON "BSD"

EMSDN.COM