Centos7.5 编译安装apr-util时报错:xml/apr_xml.c:35:19: fatal error: expat.h: No such file or directory

报错信息:

[root@localhost apr-util-1.6.1]# make
make[1]: Entering directory `/home/bak/software/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/home/bak/software/apr-util-1.6.1/include -I/home/bak/software/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 `/home/bak/software/apr-util-1.6.1'
make: *** [all-recursive] Error 1

一般这类错误都是缺少依赖

解决方法:

yum install expat-devel

猜你喜欢

转载自blog.csdn.net/weixin_43840640/article/details/89467562