大网数据广告活动
服务器运维问答

Linux: Is it possible to know which options an installation was configured and compiled with?

· 52CE 我爱测

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 …

问题原文

原帖链接 · Itai Ganot · CC BY-SA 3.0

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?

已采纳解答

原帖链接 · dawud · CC BY-SA 3.0

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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2014-07-16)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。