nagios compile 시 오류

nagios-3.3.1.tar.gz
OS : CentOS 5.6 32BIT

nagios 컴파일시 다음과 같은 오류가 발생하여 더 이상 컴파일을 진행할 수가 없었다.




 [root@localhost nagios]# make fullinstall
cd ././base && make install
make[1]: Entering directory `/root/nagios/nagios/base’
make install-basic
make[2]: Entering directory `/root/nagios/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 `/root/nagios/nagios/base’
make strip-post-install
make[2]: Entering directory `/root/nagios/nagios/base’
/usr/bin/strip /usr/local/nagios/bin/nagios
/usr/bin/strip /usr/local/nagios/bin/nagiostats
make[2]: Leaving directory `/root/nagios/nagios/base’
make[1]: Leaving directory `/root/nagios/nagios/base’
cd ././cgi && make install
make[1]: Entering directory `/root/nagios/nagios/cgi’
make install-basic
make[2]: Entering directory `/root/nagios/nagios/cgi’
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/sbin
for file in *.cgi; do \
                /usr/bin/install -c -m 775 -o nagios -g nagios $file /usr/local/nagios/sbin; \
        done
make[2]: Leaving directory `/root/nagios/nagios/cgi’
make strip-post-install
make[2]: Entering directory `/root/nagios/nagios/cgi’
for file in *.cgi; do \
                /usr/bin/strip /usr/local/nagios/sbin/$file; \
        done
make[2]: Leaving directory `/root/nagios/nagios/cgi’
make[1]: Leaving directory `/root/nagios/nagios/cgi’
cd ././html && make install
make[1]: Entering directory `/root/nagios/nagios/html’
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/share
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/share/media
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/share/stylesheets
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/share/contexthelp
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/share/docs
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/share/docs/images
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/share/images
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/share/images/logos
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/share/includes
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/share/includes/rss
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/share/includes/rss/extlib
/usr/bin/install -c -m 775 -o nagios -g nagios -d /usr/local/nagios/share/ssi
/usr/bin/install -c -m 664 -o nagios -g nagios robots.txt /usr/local/nagios/share
rm -f /usr/local/nagios/share/index.html
rm -f /usr/local/nagios/share/main.html
rm -f /usr/local/nagios/share/side.html
for file in *.php; \
        do /usr/bin/install -c -m 664 -o nagios -g nagios $file /usr/local/nagios/share; done
for file in stylesheets/*.css; \
        do /usr/bin/install -c -m 664 -o nagios -g nagios $file /usr/local/nagios/share/stylesheets; done
for file in contexthelp/*.html; \
        do /usr/bin/install -c -m 664 -o nagios -g nagios $file /usr/local/nagios/share/contexthelp; done
for file in images/*.gif; \
        do /usr/bin/install -c -m 664 -o nagios -g nagios $file /usr/local/nagios/share/images; done
for file in images/*.jpg; \
        do /usr/bin/install -c -m 664 -o nagios -g nagios $file /usr/local/nagios/share/images; done
for file in images/*.png; \
        do /usr/bin/install -c -m 664 -o nagios -g nagios $file /usr/local/nagios/share/images; done
for file in images/*.ico; \
        do /usr/bin/install -c -m 664 -o nagios -g nagios $file /usr/local/nagios/share/images; done
for file in images/logos/*.*; \
        do /usr/bin/install -c -m 664 -o nagios -g nagios $file /usr/local/nagios/share/images/logos; done
for file in includes/*.*; \
        do /usr/bin/install -c -m 664 -o nagios -g nagios $file /usr/local/nagios/share/includes; done
for file in includes/rss/*; \
        do /usr/bin/install -c -m 664 -o nagios -g nagios $file /usr/local/nagios/share/includes/rss; done
/usr/bin/install: omitting directory `includes/rss/extlib’
/usr/bin/install: omitting directory `includes/rss/htdocs’
/usr/bin/install: omitting directory `includes/rss/scripts’
make[1]: *** [install] 오류 1
make[1]: Leaving directory `/root/nagios/nagios/html’

디렉토리 권한문제로 인해 발생하였으며, 검색한 결과 다음과 같은 방법으로 해결할 수 있다.

1. ./configure
2. sed -i ‘s:for file in includes/rss/\*;:for file in includes/rss/\*.\*;:g’ ./html/Makefile
   sed -i ‘s:for file in includes/rss/extlib/\*;:for file in includes/rss/extlib/\*.\*;:g’ ./html/Makefile
3. make all
4. make fullinstall

위와 같이 configure 후 Makefile의 내용 수정후 다시 make시 정상적으로 컴파일을 마칠 수 있다.

댓글 남기기

이메일은 공개되지 않습니다.