java - 构建 Apache 时对 XML_GetErrorCode(和其他)的未定义引用
问题描述
我正在尝试在 RHEL 7 版本上构建 Apache httpd-2.4.33。我已经配置了包 apr-1.6.3、apr-util-1.6.1、pcre-8.42。
在最后阶段构建时,我收到了这个错误:
.33/modules/aaa -I/opt/httpd-2.4.33/modules/cache -I/opt/httpd-2.4.33/modules/core -I/opt/httpd-2.4.33/modules/database -I/opt/httpd-2.4.33/modules/filters -I/opt/httpd-2.4.33/modules/ldap -I/opt/httpd-2.4.33/modules/loggers -I/opt/httpd-2.4.33/modules/lua -I/opt/httpd-2.4.33/modules/proxy -I/opt/httpd-2.4.33/modules/session -I/opt/httpd-2.4.33/modules/ssl -I/opt/httpd-2.4.33/modules/test -I/opt/httpd-2.4.33/server -I/opt/httpd-2.4.33/modules/md -I/opt/httpd-2.4.33/modules/arch/unix -I/opt/httpd-2.4.33/modules/dav/main -I/opt/httpd-2.4.33/modules/generators -I/opt/httpd-2.4.33/modules/mappers -prefer-non-pic -static -c passwd_common.c && touch passwd_common.lo
/opt/httpd-2.4.33/srclib/apr/build-1/libtool --silent --mode=link gcc -std=gnu99 -g -O2 -pthread -o htpasswd htpasswd.lo passwd_common.lo /opt/httpd-2.4.33/srclib/apr_util/lib/libaprutil-1.la /opt/httpd-2.4.33/srclib/apr/lib/libapr-1.la -lrt -lcrypt -lpthread -ldl -lcrypt
/opt/httpd-2.4.33/srclib/apr_util/lib/libaprutil-1.so: undefined reference to `XML_GetErrorCode'
/opt/httpd-2.4.33/srclib/apr_util/lib/libaprutil-1.so: undefined reference to `XML_SetEntityDeclHandler'
/opt/httpd-2.4.33/srclib/apr_util/lib/libaprutil-1.so: undefined reference to `XML_ParserCreate'
/opt/httpd-2.4.33/srclib/apr_util/lib/libaprutil-1.so: undefined reference to `XML_SetCharacterDataHandler'
/opt/httpd-2.4.33/srclib/apr_util/lib/libaprutil-1.so: undefined reference to `XML_ParserFree'
/opt/httpd-2.4.33/srclib/apr_util/lib/libaprutil-1.so: undefined reference to `XML_SetUserData'
/opt/httpd-2.4.33/srclib/apr_util/lib/libaprutil-1.so: undefined reference to `XML_StopParser'
/opt/httpd-2.4.33/srclib/apr_util/lib/libaprutil-1.so: undefined reference to `XML_Parse'
/opt/httpd-2.4.33/srclib/apr_util/lib/libaprutil-1.so: undefined reference to `XML_ErrorString'
/opt/httpd-2.4.33/srclib/apr_util/lib/libaprutil-1.so: undefined reference to `XML_SetElementHandler'
collect2: error: ld returned 1 exit status
make[2]: *** [htpasswd] Error 1
make[2]: Leaving directory `/opt/httpd-2.4.33/support'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/httpd-2.4.33/support'
make: *** [all-recursive] Error 1
有人可以帮忙吗?
解决方案
尝试
yum install expat-devel
在安装Apache之前。mod-wsgi-standalone
在Amazon Linux上安装时出现此错误,但也许此解决方案在一般情况下也有帮助。
推荐阅读
- node.js - Apache ReverseProxy 不适用于 Node 和 SSL
- python - “张量流”没有属性“配置”
- output - 为什么for循环只输出第一个和最后一个条目
- java - 有没有办法使用 PythonInterpreter 将 Python 代码的输出值(如“print('python code')”)返回到字符串或其他对象中
- javascript - 在ajax请求中使用2个函数
- javascript - 在同一路由Angular上将数据从一个解析器传递到另一个解析器
- flutter - 在颤动中删除下拉底线
- python - Win 错误 10060:我无法连接到服务器
- javascript - 加载特定页面时,如何在我的 Service Worker 上运行特定功能?
- javascript - 谷歌表格中的“脚本应用程序”是否会自动登录网站?