编译前准备
编译apr-util 前需要先编译expat
下载源码
地址:https://distfiles.macports.org/expat/expat-2.2.9.tar.bz2
wget https://distfiles.macports.org/expat/expat-2.2.9.tar.bz2
解压
tar -xjf expat-2.2.9.tar.bz2
进入解压后的文件中,配置
cd expat-2.2.9
./configure --host=aarch64-linux --prefix=/usr/local/expat CC=aarch64-v01c01-linux-gnu-gcc
出现错误:
checking for docbook-to-man... docbook-to-man
/usr/bin/onsgmls:E: cannot find "--help"; tried "--help", "/usr/local/share/sgml/--help", "/usr/share/sgml/--help"
/usr/bin/onsgmls:/usr/share/sgml/docbook/dtd/4.1/docbook.dcl:106:2:E: end of document in prolog
Error: End of AccumElemInfo - should not be here: (No element)
解决方法:加上--without-docbook
然后 make make install
编译apr-util
下载源码并解压
# 下载 APR-Util 源代码
wget https://archive.apache.org/dist/apr/apr-util-1.6.1.tar.gz# 解压并进入目录
tar -xvzf apr-util-1.6.1.tar.gz
cd apr-util-1.6.1
进入apr-util目录,配置
make
make install