angela 发表于 2018-11-23 10:50:26

Apache编译时error:APR not found-ii

  checking for APR... no
  configure: error: APR not found .Please read the documentation.
  可以用./configure –help | grep apr 查看帮助。
  --with-included-apr   Use bundled copies of APR/APR-Util
  --with-apr=PATH         prefix for installed APR or the full path to apr-config
  --with-apr-util=PATH    prefix for installed APU or the full path to
  安装APR(Apache Portable Runtime )
  # cd /tmp/52lamp/ //源码存放位置
  # tar -zxvf apr-1.4.2.tar.gz //unzip -o apr-1.4.2.zip
  # cd apr-1.4.2
  # ./configure
  # make
  # make install
  再次检查编译环境出现
  checking for APR-util... no
  configure: error: APR-util not found .Please read the documentation.
  # ./configure –help | grep apr-util
  --with-apr-util=PATH    prefix for installed APU or the full path to
  # tar -zxvf apr-util-1.3.9.tar.gz
  # cd apr-util-1.3.9
  # ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr
  # make
  # make install
  ./configure仍提示APR-util not found,增加--with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util后出现
  configure: error: pcre-config for libpcre not found. PCRE is required and available from http://pcre.org/
  # ./configure –help | grep pcre
  --with-pcre=PATH      Use external PCRE library
  # unzip -o pcre-8.10.zip
  # cd pcre-8.10
  # ./configure --prefix=/usr/local/pcre
  # make
  # make install
  缺少gcc-c++和libtool,也就是c++编译包
  libtool: compile: unrecognized option `-DHAVE_CONFIG_H'
  libtool: compile: Try `libtool --help' for more information.
  make: *** Error 1
  make: Leaving directory `/home/guangbo/work/pcre-8.12'
  make: *** Error 2
  解决方法:需要先安装libtool和gcc-c++
  继续安装Apache/httpd,./configure 时加上参数 --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre,这个问题就解决了。
  Apache安装过程,Apr、apr-util、pcre下载详见本站其他页面。

页: [1]
查看完整版本: Apache编译时error:APR not found-ii