编译apache报APR not found

系统环境:

[vagrant@rs-2 download]$ cat /etc/redhat-release 

CentOS release 5.6 (Final)

[vagrant@rs-2 download]$ uname -a

Linux rs-2 2.6.18-238.el5 #1 SMP Thu Jan 13 15:51:15 EST 2011 x86_64 x86_64 x86_64 GNU/Linux


编译apache 2.4.9

[vagrant@rs-1 httpd-2.4.9]$ ./configure --prefix=/usr/local/apache


编译apache, 遇到以下错误

configure: error: APR not found.  Please read the documentation.


configure: error: APR-util not found.  Please read the documentation.



http://archive.apache.org/dist/apr/去下载相关包

[vagrant@rs-1 download]$ wget http://archive.apache.org/dist/apr/apr-1.5.1.tar.gz

[vagrant@rs-1 download]$ wget http://archive.apache.org/dist/apr/apr-util-1.5.3.tar.gz



安装 apr 包

[vagrant@rs-1 apr-1.5.1]$ ./configure --prefix=/usr/local/apr

[vagrant@rs-1 apr-1.5.1]$ make

[vagrant@rs-1 apr-1.5.1]$ sudo make install



安装apr-util

[vagrant@rs-1 apr-util-1.5.3]$ ./configure --prefix=/usr/local/apr-util -with-apr=/usr/local/apr/bin/apr-1-config 


[vagrant@rs-1 apr-util-1.5.3]$ make 


[vagrant@rs-1 apr-util-1.5.3]$ sudo make install


最后,编译apache时候加上
--with-apr=/usr/local/apr \
--with-apr-util=/usr/local/apr-util/

[vagrant@rs-1 httpd-2.4.9]$ ./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util/



  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值