在fedora 17上收集write_mongodb插件lt_dlopen错误.colled无法识别已安装的lib

时间:2013-04-24 10:17:46

标签: fedora collectd

我从git repo下载了libmongoc驱动程序并进行安装。然后我下载了collectd tar文件,并解压缩并尝试安装它,每件事情都没问题,但是当我尝试运行collect d时,我遇到了这些错误:

[path to collectd]# sbin/collectd
ERROR: lt_dlopen ("/opt/collectd/lib/collectd/write_mongodb.so") failed: file not found.
The most common cause for this problem are missing dependencies. 
Use ldd(1) to check the dependencies of the plugin / shared object.
[path to  collectd]# 

[path to collectd]# ldd /opt/collectd/lib/collectd/write_mongodb.so
linux-vdso.so.1 =>  (0x00007fff1dbaa000)
libmongoc.so.0.7 => not found
libdl.so.2 => /lib64/libdl.so.2 (0x00007f8351fd1000)
libc.so.6 => /lib64/libc.so.6 (0x00007f8351c1a000)
/lib64/ld-linux-x86-64.so.2 (0x00007f83523e4000)
[path to collectd]# 
[path to  collectd]# locate libmongoc.so.0.7
/usr/local/lib/libmongoc.so.0.7
/usr/local/lib/libmongoc.so.0.7.1
[path to collectd]# 

为什么collectd无法识别已安装的libmongoc库?

1 个答案:

答案 0 :(得分:0)

我成功地使用write_mongodb安装了collectd。

[root@stackdev ~]# ldd /usr/local/etc/collectd/lib/collectd/write_mongodb.so 
    linux-vdso.so.1 =>  (0x00007fffa3ffe000)
    libmongoc.so.0.6 => not found
    libdl.so.2 => /lib64/libdl.so.2 (0x00007f1134fe8000)
    libc.so.6 => /lib64/libc.so.6 (0x00007f1134c2f000)
    /lib64/ld-linux-x86-64.so.2 (0x00007f1135614000)

然后我复制了libmongoc.so.0.6(我将它安装在/ usr / local / lib )进入/ lib64目录 然后运行collectd,一切正常。
希望这可以帮到你。