Do You PHP はてブロ

Do You PHPはてなからはてブロに移動しました

Cannot use an external APR-util with the bundled APR

新規にインストールしたCentOS4.4(RPMApacheapr-utilも入っていません)にApache2.2.4(src)をインストール後、再インストールするためにmake distcleanしてから再度configureすると

Configuring Apache Portable Runtime Utility library...

checking for APR-util... yes
configure: error: Cannot use an external APR-util with the bundled APR

とエラーになってしまいました。Apache2.2.3ではなかった(ハズ)なのに。。。
調べてみると、コンパイルとインストール - Apache HTTP サーバにある


aprapr-util は Apache HTTPd ソースリリースに同梱されていますし、どんな環境でもほぼ問題なく 使えるはずです。ただし aprapr-util のバージョン 1.0 や 1.1 がシステムの一部として既にインストールされている場合、 apr/apr-util を 1.2 にアップグレードするか、 httpd を隔離した環境でビルドする必要があります。 バンドルされている apr/apr-util を使って アップグレードする場合は、これらを手動でインストールする必要があります :

# Build and install apr 1.2
cd srclib/apr
./configure --prefix=/usr/local/apr-httpd/
make
make install

# Build and install apr-util 1.2
cd ../apr-util
./configure --prefix=/usr/local/apr-util-httpd/ --with-apr=/usr/local/apr-httpd/
make
make install

# Configure httpd
cd ../../
./configure --with-apr=/usr/local/apr-httpd/ --with-apr-util=/usr/local/apr-util-httpd/

の手順で大丈夫のようです。もしくは、configureオプションに「--with-included-apr」を付けても良いみたいです。

# ./configure --enable-mods-shared="all cache disk-cache mem-cache proxy" --with-included-apr