首先,可以进入/usr/local/nagios/sbin,
monitor# ldd statusmap.cgi
statusmap.cgi:
libgd.so.4 => /usr/local/lib/libgd.so.4 (0x280a8000)
libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x280f2000)
libpng.so.6 => not found (0x0)
libjpeg.so.11 => not found (0x0)
libz.so.4 => /lib/libz.so.4 (0x281e8000)
libm.so.5 => /lib/libm.so.5 (0x281fa000)
libc.so.7 => /lib/libc.so.7 (0x2820f000)
libpng.so.5 => /usr/local/lib/libpng.so.5 (0x28311000)
libjpeg.so.9 => /usr/local/lib/libjpeg.so.9 (0x28336000)
libfreetype.so.9 => /usr/local/lib/libfreetype.so.9 (0x28355000)
在我这里显示的结果发现,libpng.so.6 => not found (0x0),libjpeg.so.11 => not found (0x0)这两个图片支持库文件没找到。应该是在安装php的时候漏装了。现在只有再补装回来。安装方法:
#cd /usr/ports/ #make search name=zlib #cd /usr/ports/devel/fpc-zlib #make install clean #make search name=libpng #cd /usr/ports/graphics/fpc-libpng #make install clean #cd /usr/ports/graphics/jpeg #make install clean #cd /usr/ports/graphics/fpc-libgd #make install clean |
然后再执行一次:
monitor# ldd statusmap.cgi
statusmap.cgi:
libgd.so.4 => /usr/local/lib/libgd.so.4 (0x280a8000)
libiconv.so.3 => /usr/local/lib/libiconv.so.3 (0x280f2000)
libpng.so.6 => /usr/local/lib/libpng.so.6 (0x281e8000)
libjpeg.so.11 => /usr/local/lib/libjpeg.so.11 (0x2820d000)
libz.so.4 => /lib/libz.so.4 (0x28243000)
libm.so.5 => /lib/libm.so.5 (0x28255000)
libc.so.7 => /lib/libc.so.7 (0x2826a000)
libfreetype.so.9 => /usr/local/lib/libfreetype.so.9 (0x2836c000)
这时就不会再提示丢失支持库文件了。
重启nagios即可生效!
/usr/local/rc.d/nagios restart
阅读(2002) | 评论(0) | 转发(0) |