注册 | 登录 忘记密码? 51cto首页 | 博客 | 论坛 | 招聘
热点文章 小五思科技术学习笔记之SSH
 帮助

Nagios,安装远远没完


2007-09-18 12:57:34
版权声明:原创作品,谢绝转载!否则将追究法律责任。
 
 
如果按照我之前的文档,肯定可以安装成功吗?我不能保证.这不我就碰到了这样的问题.
一个新的项目要安装nagios监控几台服务器,我按照正常步骤进行着.
首先在监控服务器上安装nagios主程序,然后是安装插件,可是在make的时候报了如下的错误
gcc -g -O2 -o check_http check_http.o sslutils.o netutils.o utils.o  -L/home/jacky/nagios/nagios-plugins-1.4.9/plugins -L/usr/local/openssl/lib
../lib/libnagiosplug.a ../gl/libgnu.a -lnsl -lresolv -lssl -lcrypto
/usr/local/openssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_func':
dso_dlfcn.c:(.text+0x2b4): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x361): undefined reference to `dlerror'
/usr/local/openssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_bind_var':
dso_dlfcn.c:(.text+0x3d4): undefined reference to `dlsym'
dso_dlfcn.c:(.text+0x481): undefined reference to `dlerror'
/usr/local/openssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_unload':
dso_dlfcn.c:(.text+0x4dd): undefined reference to `dlclose'
/usr/local/openssl/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_load':
dso_dlfcn.c:(.text+0x592): undefined reference to `dlopen'
dso_dlfcn.c:(.text+0x5fb): undefined reference to `dlclose'
dso_dlfcn.c:(.text+0x623): undefined reference to `dlerror'
collect2: ld returned 1 exit status
make[2]: *** [check_http] Error 1
make[2]: Leaving directory `/home/jacky/nagios/nagios-plugins-1.4.9/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/jacky/nagios/nagios-plugins-1.4.9'
make: *** [all] Error 2
我的步骤是保证没有错误的,重复了几次也是一样.怎么办?google.看了好多有说库文件的,有说openssl不兼容的,可就是没给出解决的办法.我逛到秋香的那篇文章里面,发现文章后面的留言有个人也是类似的错误,很可惜,秋香没有给出答案.
 
没办法了,按照别人的建议装rpm版的,要知道插件本身就是一些可以独立执行的程序,我装上去以后把他们copy/usr/loca/nagios/libexec下不就行了,来个狸猫换太子.按照提示安装了很多的依赖性软件包,终于把插件都装好了.把初始的监控主机存活的服务加上去了,运行正常.
(:我以为把这些依赖包装上去了,我的插件也可以make,但是很不幸,仍然是那个错误,但无论如何,rpm来安装插件是没问题了)
 
在被监控机上,很显然的安装插件的时候也是在这个地方报错了.(因为这些机器的初始配置都一样).NRPE我不报希望了,因为搜索的过程中也有人在安装NRPE的时候碰到这个错误.
 
rpm??只有rpm?光是要装那些依赖性包我就会头晕了.继续google.
曙光,是的曙光!
 
看过之后如此解决:
在安装插件的时候如果make报这个错误,则使用
make LDFLAGS+=-ldl
在安装nrpe的时候如果make报这个错误,则使用
export CFLAGS=-ldl
./configure
make all
 
具体原因请参考我给出的链接.

本文出自 “yahoon的小屋” 博客,谢绝转载!





    文章评论
 <<   1   2   >>   页数 ( 1/2 )  
2007-09-18 15:56:43
牛!搜资料不问出处,英文论坛有好料

2007-09-19 21:43:36
先去看一下
这么多的东西

2007-09-19 23:00:22
我的插件安装很顺利呀 没出现你讲的这个

2007-09-20 09:11:52
呵呵 不同机器的配置不一样.我装了几台也很好.可这个公司的都有这个问题.具体问题具体分析

2007-09-20 09:40:37
博主,你好
发现一个问题,如果windows下一个服务名称有空格,就没办法监控

请问这个有解吗?

谢谢!

2007-09-20 13:31:52
你看服务相关的进程启动没不就行了?
不会你的进程名称也有空格吧...

2007-09-21 09:55:38
用引号

2007-09-21 11:04:31
呵呵,谢谢sery

用单引号是OK的

2007-11-22 22:18:17
楼主忘记说明一件事了,安装插件时./configure 时可能出现checking for redhat spopen problem...就不动的情况,所以在./configure后面仍需加入--enable-redhat-pthread-workaround 。^_^

2007-11-24 08:26:59
楼主好!我也有你说的这种情况,根据你说的方法,我 make的时候仍然报错!我没能装上libgd2-dev,我只装了libgd2-noxpm-dev ,这样有问题吗?

make[2]: *** [check_http] 错误 1
make[2]: Leaving directory `/root/common/nagios-plugins-1.4.10/plugins'
make[1]: *** [all-recursive] 错误 1
make[1]: Leaving directory `/root/common/nagios-plugins-1.4.10'
make: *** [all] 错误 2

 <<   1   2   >>   页数 ( 1/2 )  

发表评论

昵   称:
验证码:  点击图片可刷新验证码  博客过2级,无需填写验证码
内   容: