编译ndoutils-1.4b9时报错

[root@abc ndoutils-1.4b9]# make
cd ./src && make
make[1]: Entering directory `/nagios/ndoutils-1.4b9/src'
gcc -fPIC -g -O2 -I/usr/local/mysql/include -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 `/nagios/ndoutils-1.4b9/src'
make: *** [all] Error 2

看报错肯定和mysql有关系,由此可以检查mysql的安装包

[root@abc ndoutils-1.4b9]# rpm -qa |grep mysql
mysql-server-5.1.73-3.el6_5.x86_64
mysql-libs-5.1.73-3.el6_5.x86_64
php-mysql-5.3.3-27.el6_5.x86_64

没有安装mysql-devel包,所以yum 安装就可以了。然后重新编译。

你可能感兴趣的:(mysql,编译,ndoutils)