I need to implement some web checks in our Zabbix system which requires Zabbix to be compiled with the libcurl
(curl) option, but I don't know how to check if it was compiled with this option or not, Is there any command or file which will assist me in finding the answer?
- 10,424
- 27
- 88
- 143
-
which distribution are you using? – Dmitri Chubarov Jul 16 '14 at 07:15
-
The distribution the server is running is CentOS 6.5 , thanks. – Itai Ganot Jul 16 '14 at 07:47
2 Answers
You need to use ldd(1)
to print shared library dependencies. If the zabbix-agent
was compiled with curl
suppport, it was linked dynamically against the libcurl
library in compilation time.
I don't have a zabbix installation handy right now, but the procedure is simple:
# ldd $(which curl)
linux-vdso.so.1 => (0x00007fff4572b000)
libcurl.so.4 => /lib64/libcurl.so.4 (0x00007f07a4189000)
libmetalink.so.3 => /lib64/libmetalink.so.3 (0x00007f07a3f7a000)
You should see libcurl
in the output. Just replace curl
with zabbix-agent
.
- 14,918
- 3
- 41
- 61
-
Thanks! [root@zabbix ~]# ldd /usr/sbin/zabbix_agent linux-vdso.so.1 => (0x00007ffff93fe000) libcurl.so.4 => /usr/lib64/libcurl.so.4 (0x00007fd773094000) – Itai Ganot Jul 16 '14 at 08:02
I wanted to expand on dawud's answer, which was correct, but somewhat incomplete.
My environment is Debian Buster amd64 and Zabbix 4.4.5 rev b93f5c4fc0
I needed to see if pre-compiled zabbix_server
from Zabbix repo was compiled with libxml2
and libcurl
for VMware monitoring, as per this article https://www.zabbix.com/documentation/current/manual/vm_monitoring
So I performed:
# ldd /usr/sbin/zabbix_server | egrep 'libxml2|libcurl'
Which resulted in:
libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007f784dbd1000)
libcurl.so.4 => /usr/lib/x86_64-linux-gnu/libcurl.so.4 (0x00007f784ce29000)
The same can obviously be done with zabbix_agent
- 279
- 1
- 3
- 12