Apache(httpd)./configure 无法检测 APR?

Apache(httpd)./configure 无法检测 APR?

我通过以下命令安装了 APR(Apache Portable Runtime):

wget http://apache.mirrors.pair.com//apr/apr-1.4.6.tar.bz2
./configure --prefix=/usr/local/apr
make
make install

现在,当我 ./configure httpd 时,它会失败并显示以下消息。

checking for APR version 1.3.0 or later... no
configure: error: APR version 1.3.0 or later is required

有人可以帮帮我吗?

以下是完整的日志:

%。/配置

 checking for chosen layout... Apache
 checking for working mkdir -p... yes
 checking for grep that handles long lines and -e... /bin/grep
 checking for egrep... /bin/grep -E
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu

Configuring Apache Portable Runtime library ...

checking for APR... yes
setting CC to "gcc"
setting CPP to "gcc -E"
setting CFLAGS to " -g -O2 -pthread"
setting CPPFLAGS to " -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE"
setting LDFLAGS to " "

Configuring Apache Portable Runtime Utility library...

 checking for APR-util... yes
 checking for gcc... gcc
 checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for gcc option to accept ISO C99... -std=gnu99
checking for pcre-config... /usr/bin/pcre-config
configure: Using external PCRE library from /usr/bin/pcre-config
setting PCRE_INCLUDES to ""
setting PCRE_LIBS to "-lpcre"

Configuring Apache httpd ...

 setting INCLUDES to "-I."
 adding "-I$(top_srcdir)/os/$(OS_DIR)" to INCLUDES
 adding "-I$(top_srcdir)/include" to INCLUDES
 adding "-I/usr/cisco/packages/httpd/httpd-2.2.6/include" to INCLUDES

 Applying OS-specific hints for httpd ...

forcing SINGLE_LISTEN_UNSERIALIZED_ACCEPT to "1"
forcing AP_NONBLOCK_WHEN_MULTI_LISTEN to "1"
checking for rm... /bin/rm
checking for pkg-config... /usr/bin/pkg-config
checking for rsync... /usr/cisco/bin/rsync
checking for gawk... gawk
checking whether ln -s works... yes
checking for ranlib... ranlib
checking for lynx... no
checking for links... links
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for library containing strerror... none required
checking for APR version 1.3.0 or later... no
configure: error: APR version 1.3.0 or later is required

答案1

我的猜测是,它正在寻找一个较旧的系统 APR-util,而不是你刚刚安装的那个。

我会检查 configure.log 来查看它使用了哪个 APR。

答案2

您应该提供 APR 实用程序选项以及 APR,如下所示。对于我使用 Apache 版本 2.4.x 和 APR 版本 1.4.x 的情况,此方法有效:

./configure –with-apr=/usr/local/apr/ –with-apr-util=/usr/local/apr-util/

答案3

为了更好地理解,尝试

./configure --help

实际命令是

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

相关内容