nagios安装后进行访问,点击map时提示“Internal Server Error”,通过查看apache错误日志,发现记录了下面的错误:
[Wed Sep 08 17:46:59 2010] [error] [client 192.168.9.105] /usr/local/nagios/sbin/statusmap.cgi: error while loading shared libraries: libiconv.so.2: cannot open shared object file: Error 40, referer:
没有libiconv.so.2这个文件,
运行:
ldd /usr/local/nagios/sbin/statusmap.cgi
出现以下结果:
libgd.so.2 => /usr/lib/libgd.so.2 (0x00602000)
libiconv.so.2 => not found
libpng12.so.0 => /usr/lib/libpng12.so.0 (0x00526000)
libjpeg.so.7 => not found
libz.so.1 => /usr/lib/libz.so.1 (0x008a5000)
libm.so.6 => /lib/tls/libm.so.6 (0x00a80000)
libc.so.6 => /lib/tls/libc.so.6 (0x00111000)
libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x00d3a000)
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x00dcf000)
libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x00240000)
libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x0025e000)
/lib/ld-linux.so.2 (0x0046d000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x003b1000)
libdl.so.2 => /lib/libdl.so.2 (0x00b9e000)
libiconv.so.2文件被放置在/usr/local/lib目录中,在网上搜了一下,有的网友说在/etc/ld.so.conf文件中添加文件所在的目录就行,试了一下,直接vi打开/etc/ld.so.conf文件,添加“/usr/local/lib”,重启apache,OK了!
阅读(3460) | 评论(0) | 转发(0) |