0

我在安装 nagios 服务器时遇到问题。我不是 linux 胡子,但我知道一些基础知识,但我不确定从这里去哪里。

我想我已经安装了所有依赖项并设置了其他所有内容,并且配置似乎很顺利(我一直在遵循 W Barth 的 Nagios(第 2 版)中的指南),只是当我运行“make all”时出现错误出去。

我正在运行 CentOS 6.4 最小安装。

这是错误

cd ./base && make
make[1]: Entering directory `/usr/local/src/nagios/base'
gcc -Wall -g -O2  -DHAVE_CONFIG_H -DNSCORE   -c -o checks.o checks.c
In file included from checks.c:41:
../include/epn_nagios.h:11:20: error: EXTERN.h: No such file or directory
../include/epn_nagios.h:12:18: error: perl.h: No such file or directory
In file included from checks.c:41:
../include/epn_nagios.h:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’
checks.c: In function ‘run_async_service_check’:
checks.c:355: error: ‘SV’ undeclared (first use in this function)
checks.c:355: error: (Each undeclared identifier is reported only once
checks.c:355: error: for each function it appears in.)
checks.c:355: error: ‘plugin_hndlr_cr’ undeclared (first use in this function)
checks.c:361: error: ‘dSP’ undeclared (first use in this function)
checks.c:557: error: ‘ENTER’ undeclared (first use in this function)
checks.c:558: error: ‘SAVETMPS’ undeclared (first use in this function)
checks.c:559: warning: implicit declaration of function ‘PUSHMARK’
checks.c:559: error: ‘SP’ undeclared (first use in this function)
checks.c:560: warning: implicit declaration of function ‘XPUSHs’
checks.c:560: warning: implicit declaration of function ‘sv_2mortal’
checks.c:560: warning: implicit declaration of function ‘newSVpv’
checks.c:564: error: ‘PUTBACK’ undeclared (first use in this function)
checks.c:568: warning: implicit declaration of function ‘call_pv’
checks.c:568: error: ‘G_SCALAR’ undeclared (first use in this function)
checks.c:568: error: ‘G_EVAL’ undeclared (first use in this function)
checks.c:570: error: ‘SPAGAIN’ undeclared (first use in this function)
checks.c:572: warning: implicit declaration of function ‘SvTRUE’
checks.c:572: error: ‘ERRSV’ undeclared (first use in this function)
checks.c:581: error: ‘POPs’ undeclared (first use in this function)
checks.c:584: warning: implicit declaration of function ‘SvPVX’
checks.c:629: warning: implicit declaration of function ‘newSVsv’
checks.c:634: error: ‘FREETMPS’ undeclared (first use in this function)
checks.c:635: error: ‘LEAVE’ undeclared (first use in this function)
checks.c:713: error: ‘G_ARRAY’ undeclared (first use in this function)
checks.c:717: error: ‘POPpx’ undeclared (first use in this function)
checks.c:718: error: ‘POPi’ undeclared (first use in this function)
make[1]: *** [checks.o] Error 1
make[1]: Leaving directory `/usr/local/src/nagios/base'
make: *** [all] Error 2

提前致谢。

4

1 回答 1

0
root@nagios:~$ CD NAGIOS
root@nagios:~$ MAKE CLEAN
root@nagios:~$ ./CONFIGURE --PREFIX=/OPT/NAGIOS-PRIMARY --WITH-NAGIOS-USER=NAGIOS --WITH-NAGIOS-GROUP=NAGIOS
root@nagios:~$ MAKE ALL
root@nagios:~$ SED -I 'S:FOR FILE IN INCLUDES/RSS/\*;:FOR FILE IN INCLUDES/RSS/\*.\*;:G' ./HTML/MAKEFILE
root@nagios:~$ MAKE INSTALL
root@nagios:~$ CP DAEMON-INIT /ETC/INIT.D/NAGIOS-PRIMARY
root@nagios:~$ CHMOD +X /ETC/INIT.D/NAGIOS-PRIMARY
root@nagios:~$ MAKE INSTALL-CONFIG
root@nagios:~$ MAKE INSTALL-COMMANDMODE
root@nagios:~$ CP SAMPLE-CONFIG/HTTPD.CONF /ETC/APACHE2/CONF.D/NAGIOS-PRIMARY.CONF
root@nagios:~$ HTPASSWD –C /OPT/NAGIOS-PRIMARY/ETC/HTPASSWD.USERS NAGIOSADMIN
root@nagios:~$ VI /ETC/APACHE2/CONF.D/NAGIOS-PRIMARY.CONF (set paths correctly)
root@nagios:~$ VI /OPT/NAGIOS-PRIMARY/SHARE/CONFIG.INC.PHP (idemdito)
root@nagios:~$ /ETC/INIT.D/APACHE2 RELOAD

我想这与 SED 行有关,我遇到了同样的问题,并且 SED 命令完成了这项工作;)

于 2013-04-30T10:34:36.240 回答