天天看点

linux离线安装apr-util 报错,源码安装Apache,报错:Cannot use an external APR with the bundled APR-util...

之前安装过http的2.2.21,后面换成版本2.2.19,然后就出现apache报错:Cannot use an external APR with the bundled APR-util

linux离线安装apr-util 报错,源码安装Apache,报错:Cannot use an external APR with the bundled APR-util...

一般在第一次源码安装是没有问题的,在版本变化情况下在次源码安装可能会遇到此问题:

apache2.0.x与apache2.2.x在apr有很大区别,前者为依赖公用apr,后者依赖于自身的apr。一般前者也就是2.0.x的编译基本上没有apr方面的问题。如果是后者也出现关于apr的问题,则将安装前的apr去除后,在编译apache2.2.x自身的apr,在srclib目录中。

因此根据提示解决此问题:

1、安装APR:

[[email protected] httpd-2.2.19]# cd srclib/apr

[[email protected] apr]# ./configure --prefix=/usr/local/apr

[[email protected] apr]# make && make install

linux离线安装apr-util 报错,源码安装Apache,报错:Cannot use an external APR with the bundled APR-util...

2、安装APR-util

[[email protected] httpd-2.2.19]# cd srclib/apr-util

[[email protected] httpd-2.2.19]# ./configure --prefix=/usr/local/apr-util --with-apr=/usr/local/apr

[[email protected] httpd-2.2.19]# make && make install

linux离线安装apr-util 报错,源码安装Apache,报错:Cannot use an external APR with the bundled APR-util...

3、安装apache,加入参数(--with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util)

[[email protected] httpd-2.2.19]# ./configure --prefix=/opt/apache --enable-deflate --enable-expires --enable-headers --enable-modules=most --enable-so --with-mpm=worker --enable-rewrite --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util

linux离线安装apr-util 报错,源码安装Apache,报错:Cannot use an external APR with the bundled APR-util...

OK,解决。

linux离线安装apr-util 报错,源码安装Apache,报错:Cannot use an external APR with the bundled APR-util...