[root@test1 apr-util-1.6.1]# make
make[1]: Entering directory /root/apr-util-1.6.1' /bin/sh /usr/local/apr/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread -DHAVE_CONFIG_H -DLINUX -D_REENTRANT -D_GNU_SOURCE -I/root/apr-util-1.6.1/include -I/root/apr-util-1.6.1/include/private -I/usr/local/apr/include/apr-1 -o xml/apr_xml.lo -c xml/apr_xml.c && touch xml/apr_xml.lo xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory #include <expat.h> ^ compilation terminated. make[1]: *** [xml/apr_xml.lo] Error 1 make[1]: Leaving directory/root/apr-util-1.6.1’
make: *** [all-recursive] Error 1

经网上搜索到如下解决方法:
yum install -y expat-devel*
安装后确实可以正常make

这里要注意,如果只yum search expat只会找到expat包,要yum search expat*才会看到还有expat-devel的包

Logo

更多推荐