编译安Apache2.4.43报错checking for APR... no configure: error: APR not found. Please read the documentation.

一. 报错现象

 

 

二.解决方法

下载所需软件包,要安装新版本:

wget http://mirrors.tuna.tsinghua.edu.cn/apache//apr/apr-1.6.5.tar.gz

wget http://archive.apache.org/dist/apr/apr-util-1.3.12.tar.gz

wget http://jaist.dl.sourceforge.net/project/pcre/pcre/8.10/pcre-8.10.zip

 

1、解决apr not found问题

 tar -zxf apr-1.6.5.tar.gz
 cd  apr-1.6.5
 ./configure --prefix=/usr/local/apr
 make && make install

 

2、解决APR-util not found问题

tar -zxf apr-util-1.3.12.tar.gz
cd apr-util-1.3.12
./configure --prefix=/usr/local/apr-util -with-apr=/usr/local/apr/bin/apr-1-config
make && make install 

 

3、解决pcre问题

unzip -o pcre-8.10.zip 
cd pcre-8.10
./configure --disable-shared --with-pic --prefix=/usr/local/pcre
make && make install

 

三.变更

./configure --prefix=/usr/local/apache2/ 

改用:

./configure --prefix=$H_PREFIX --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util 

这样报错就解决了

posted @ 2020-04-30 17:27  憨憨青年  阅读(799)  评论(0编辑  收藏  举报
// 侧边栏目录 // https://blog-static.cnblogs.com/files/douzujun/marvin.nav.my1502.css