编译Apache提示:APR 及PCRE 错误

来源:互联网 发布:线条底纹生成软件 编辑:程序博客网 时间:2024/05/21 06:13
编译Apache时遇到提示APR及PCRE无效

checking for APR... no

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

 

checking for pcre-config... false

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

如下图:

这是由于没有安装apr 及 apr-util 以及PCRE,因此需要下载安装,这里演示的是源码安装。

编译Apache提示:APR 及PCRE 错误
编译Apache提示:APR 及PCRE 错误

工具/原料

  •  linux  apache apr  apr-util  pcre

方法/步骤

  1. 1

     下载apr-1.4.2.tar.gz并执行编译安装

    # tar -zxvf apr-1.4.2.tar.gz

    # cd apr-1.4.2

    # ./configure

    # make  && make install

    注意:在执行configure可能会出现

     rm: cannot remove `libtoolT': No such file or directory错误信息。网上查阅了一下资料,提示编辑configure这个文件,将 $RM “$cfgfile” 那行注释掉 ,然后重新编译即可。

    编译Apache提示:APR 及PCRE 错误
  2. 2

     下载并编译安装apr-util-1.3.10

    # tar -zxvf apr-util-1.3.10.tar.gz

    # cd apr-util-1.3.10

    # ./configure -with-apr=/usr/local/apr

    # make && make install

  3. 3

     pcre的编译安装

    # tar -zxvf pcre-8.10.tar.gz

    # cd pcre-8.10

    # ./configure

    # make  && make install

     

    END

注意事项

 

在make  pcre的时候如果出现libtool: line 990: g++: command not found错误,则说明没有安装gcc+,装上gcc+就可以编译过去

0 0
原创粉丝点击