安装 Merlin - “在从 daemon.h:11 包含的文件中,从 status.c:1: sql.h:4:21: 错误:dbi/dbi.h:没有此文件或目录”

安装 Merlin - “在从 daemon.h:11 包含的文件中,从 status.c:1: sql.h:4:21: 错误:dbi/dbi.h:没有此文件或目录”

尝试安装 Merlin for Nagios,按照快速入门指南
当我运行“make”命令时出现以下错误:

sh gen-version.sh > version.c
    CC version.o
    LINK merlin.so
    CC status.o
In file included from daemon.h:11,
                 from status.c:1:
sql.h:4:21: error: dbi/dbi.h: No such file or directory
In file included from daemon.h:11,
                 from status.c:1:
sql.h:11: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘SQL_RESULT’
sql.h:25: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘sql_get_result’
status.c:28: error: expected ‘)’ before ‘result’
status.c: In function ‘prime_host_states’:
status.c:80: warning: implicit declaration of function ‘store_object_states’
status.c:80: warning: implicit declaration of function ‘sql_get_result’
status.c:80: warning: assignment makes pointer from integer without a cast
status.c: In function ‘prime_service_states’:
status.c:95: warning: assignment makes pointer from integer without a cast
make: *** [status.o] Error 1

我找不到任何有关如何修复此错误的信息。我使用的是 RHEL 5.5,如何修复此错误?

答案1

yum whatprovides '*/dbi/dbi.h'

然后选择返回的最合适的包并安装它。

相关内容