Re: [Nagvis-devel] php version couldn't be deteremined with install.sh (1.4svn)
Brought to you by:
larsi-
From: Lars M. <la...@ve...> - 2008-09-24 21:24:01
|
Hi Oliver, could you please try again with the current revision/nightly build? The issue should be fixed. Regards, Lars On Tue, 23 Sep 2008 17:42:49 +0200, "Oliver Wittenburg" <owi...@go...> wrote: > Hi, > > I started today with testing the nightly build of nagvis 1.4svn (build > of Sep 22th 2008). > > My system is Fedora 8 with nagios 3.0.3 and ndoutils 1.4b7. > > The installation with the installer script failed because the > installed php version couldn't be determined correctly. Output of > install.sh -q: > > <snip> > # ./install.sh -q > +------------------------------------------------------------------------------+ > | Welcome to NagVis Installer 0.1.2 > | > +------------------------------------------------------------------------------+ > | This program is built to facilitate the NagVis installation and update > | > | procedure for you. The installer has been tested on the following > systems: | > | - Debian Etch (4.0) > | > | - Ubuntu Hardy (8.04) > | > | - SuSE Linux Enterprise Server 10 > | > | > | > | When you experience some problems using this or another distribution, > please | > | report that to the NagVis team. > | > +------------------------------------------------------------------------------+ > +------------------------------------------------------------------------------+ > | Starting installation of NagVis svn-1681 > +------------------------------------------------------------------------------+ > | > +--- Checking for packet manager > ----------------------------------------------+ > | Using packet manager /bin/rpm > found > | > +--- Checking paths > -----------------------------------------------------------+ > | Nagios path /usr/local/nagios > found > | > +--- Checking prerequisites > ---------------------------------------------------+ > | Nagios 3.0.3 > found > | NDO2DB 1.4b7 > found > | PHP > MISSING > </snip> > > The installed php version is 5.2: > > <snip> > # rpm -q php > php-5.2.6-2.fc8 > </snip> > > I think it's line 256 which doesn't doesn't do it's job on my fedora > system: > > PHP_VER=`$PKG -qa "php[0-9]" | sed "s/php[0-9]\-//g" | sed "s/-.*$//" > | cut -d"." -f1,2` > > When i run it on the commandline: > > # /bin/rpm -qa "php[0-9]" | sed "s/php[0-9]\-//g" | sed "s/-.*$//" | > cut -d"." -f1,2 > > I get no output. > > The following line gives me the php version_ > # /bin/rpm -qa "php" | sed "s/php\-//g" | sed "s/-.*$//" | cut -d"." -f1,2 > 5.2 > > But most probably this won't work on some other distros (couldn't test > it). :-( > > Perhaps it would be an idea to check "php -v" as a fallback if the rpm > or dpkg command doesn't return a php version number: > > PHP=`which php` > $PHP -v | head -1 | sed -e "s/PHP \([0-9\]\+\.[0-9\]\+\.[0-9]\+\) .*/\1/" > > > Cheers > > Oliver > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's > challenge > Build the coolest Linux based applications with Moblin SDK & win great > prizes > Grand prize is a trip for two to an Open Source event anywhere in the > world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > Nagvis-devel mailing list > Nag...@li... > https://lists.sourceforge.net/lists/listinfo/nagvis-devel |