我已经从 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 库?