源码安装Apache apr错误

偶是新手,将自己的实做写下来,请大家斧正。

源码安装的方法大致就是那些了,我们由于后面要安装php,并将php作为动态链接库,因此会加些参数

shell>tar -zxvf *           用tar命令解压

shell>cd /*                   进入刚刚解压好的目录

shell>./configure --prefix=/usr/local/apache  --enable-so  --enable-rewrite                生成makefile文件并指定安装目录

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

搜集资料,是没有安装apr

 

shell>yum list | grep apr

        apr.i386                                 1.2.7-11.el5_6.5              installed
        apr.x86_64                               1.2.7-11.el5_6.5              installed
        apr-util.i386                            1.2.7-11.el5_5.2              instal led
        apr-util.x86_64                          1.2.7-11.el5_5.2              installed
        xorg-x11-drv-dynapro.x86_64              1.1.0-2                       installed
        apr-devel.i386                           1.2.7-11.el5_6.5              base     
        apr-devel.x86_64                         1.2.7-11.el5_6.5              base     
        apr-docs.x86_64                          1.2.7-11.el5_6.5              base    
        apr-util-devel.i386                      1.2.7-11.el5_5.2              base     
        apr-util-devel.x86_64                    1.2.7-11.el5_5.2              base    
        apr-util-docs.x86_64                     1.2.7-11.el5_5.2              base    
        apr-util-mysql.x86_64                    1.2.7-11.el5_5.2              base

我用的是centos5.X系统

shell>yum install apr-devel.x86_64 apr-util-devel.x86_64                    安装apr

shell>./configure --prefix=/usr/local/apache  --enable-so  --enable-rewrite  

   configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/

shell>yum install pcre-devel.x86_64                    安装pcre

shell>./configure --prefix=/usr/local/apache  --enable-so  --enable-rewrite 

   configure: error: APR version 1.3.0 or later is required

那么很明显这个错误时因为apr的版本比较新造成的,解决方法是安装较新的apr

shell>vim INSTALL

有这样一段话:Consider if you want to use a previously installed APR and
              APR-Util (such as those provided with many OSes) or if you
              need to use the APR and APR-Util from the apr.apache.org
              project. If the latter, download the latest versions and
              unpack them to ./srclib/apr and ./srclib/apr-util (no
              version numbers in the directory names) and use

              ./configure's --with-included-apr option.

在srclib下面创建两个目录,apr和apr-util,并下载最新版本source解压缩到相应目录

shell>./configure --prefix=/usr/local/apache2  --enable-so  --enable-rewrite   --with-included-apr

Ok ,you get you want.

shell>make clean & make

shell>make install

到这里成功安装apache了

剩下的工作就是添加man路径和path路径了。

well done!!


 

 

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值