安装ndoutils-1.4b9时报以下错
# ./configure –enable-mysql –with-mysql=/usr/local/mysql
# make
cd ./src && make
make[1]: Entering directory `/root/nagiosddd/ndoutils-1.4b9/src’
gcc -fPIC -g -O2 -I/usr/local/mysql/include/mysql -DHAVE_CONFIG_H -c -o io.o io.c
In file included from io.c:11:
../include/config.h:261:25: error: mysql/mysql.h: No such file or directory
../include/config.h:262:26: error: mysql/errmsg.h: No such file or directory
make[1]: *** [io.o] Error 1
make[1]: Leaving directory `/root/nagiosddd/ndoutils-1.4b9/src’
make: *** [all] Error 2
解决方法
# vi include/config.h
将
#include <mysql/mysql.h>
#include <mysql/errmsg.h>
修改为
#include </usr/local/mysql/include/mysql/mysql.h>
#include </usr/local/mysql/include/mysql/errmsg.h>