RHEL 6.5----apr-util1.6执行make时报错

报错信息

make[1]: Entering directory `/usr/local/src/apr-util-1.6.1'
/bin/sh /usr/local/apr1.6/build-1/libtool --silent --mode=compile gcc -g -O2 -pthread   -DHAVE_CONFIG_H  -DLINUX -D_REENTRANT -D_GNU_SOURCE   -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/include  -I/usr/local/apr1.6/include/apr-1    -o xml/apr_xml.lo -c xml/apr_xml.c && touch xml/apr_xml.lo
sed 's,^(location=).*$,1installed,' < apu-1-config > apu-config.out
/bin/sh /usr/local/apr1.6/build-1/libtool --silent --mode=link gcc  -g -O2 -pthread       -release 1 -module -rpath /usr/local/apr-util1.6/lib/apr-util-1 -o dbd/apr_dbd_pgsql.la dbd/apr_dbd_pgsql.lo -L/usr/lib64 -lpq 
gcc -E -DHAVE_CONFIG_H  -DLINUX -D_REENTRANT -D_GNU_SOURCE   -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/include  -I/usr/local/apr1.6/include/apr-1    exports.c | grep "ap_hack_" | sed -e 's/^.*[)](.*);$/1/' >> aprutil.exp
/bin/sh /usr/local/apr1.6/build-1/libtool --silent --mode=link gcc  -g -O2 -pthread       -release 1 -module -rpath /usr/local/apr-util1.6/lib/apr-util-1 -o dbd/apr_dbd_sqlite3.la dbd/apr_dbd_sqlite3.lo -lsqlite3
gcc -E -DHAVE_CONFIG_H  -DLINUX -D_REENTRANT -D_GNU_SOURCE   -I/usr/local/src/apr-util-1.6.1/include -I/usr/local/src/apr-util-1.6.1/include/private -I/usr/include  -I/usr/local/apr1.6/include/apr-1    export_vars.c | sed -e 's/^#[^!]*//' | sed -e '/^$/d' >> aprutil.exp
xml/apr_xml.c:35:19: error: expat.h: No such file or directory
xml/apr_xml.c:66: error: expected specifier-qualifier-list before ‘XML_Parser’
xml/apr_xml.c: In function ‘cleanup_parser’:
xml/apr_xml.c:364: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:365: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c: At top level:
xml/apr_xml.c:384: error: expected ‘;’, ‘,’ or ‘)’ before ‘*’ token
xml/apr_xml.c: In function ‘apr_xml_parser_create’:
xml/apr_xml.c:401: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:402: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:410: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:411: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:412: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:424: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:424: error: ‘default_handler’ undeclared (first use in this function)
xml/apr_xml.c:424: error: (Each undeclared identifier is reported only once
xml/apr_xml.c:424: error: for each function it appears in.)
xml/apr_xml.c: In function ‘do_parse’:
xml/apr_xml.c:434: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:438: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c:442: error: ‘apr_xml_parser’ has no member named ‘xp_err’
xml/apr_xml.c:442: error: ‘apr_xml_parser’ has no member named ‘xp’
xml/apr_xml.c: In function ‘apr_xml_parser_geterror’:
xml/apr_xml.c:500: error: ‘apr_xml_parser’ has no member named ‘xp_err’
xml/apr_xml.c:500: error: ‘apr_xml_parser’ has no member named ‘xp_err’
make[1]: *** [xml/apr_xml.lo] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory `/usr/local/src/apr-util-1.6.1'
make: *** [all-recursive] Error 1

解决办法

[root@node-2 apr-util-1.6.1]# yum install -y expat-devel
网友很强大,记录下
原文地址:https://www.cnblogs.com/zd520pyx1314/p/9169011.html