配置:错误:需要 APR-util 版本 1.2.0 或更高版本
我在安装httpd-2.2.21时发现以下错误:
checking for APR-util version 1.2.0 or later... no
configure: error: APR-util version 1.2.0 or later is required
我已经安装了apr-1.4.5、apr-util-1.3.12。 然后我做配置:
./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr -util/bin/apu-1-config --enable-so --enable-dav --enable-maintainer-mode --enable-rewrite
我不知道为什么。
I find the following error when I installed httpd-2.2.21:
checking for APR-util version 1.2.0 or later... no
configure: error: APR-util version 1.2.0 or later is required
I've installed apr-1.4.5, apr-util-1.3.12.
then i do configure:
./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr/bin/apr-1-config --with-apr-util=/usr/local/apr-util/bin/apu-1-config --enable-so --enable-dav --enable-maintainer-mode --enable-rewrite
I don't know why.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
我在旧的 apache httpd 版本中没有看到这个错误,新的 apache 包在文件夹 srclib 下包含了 apr 源代码,所以如果你看到这个错误,只需添加 ./configure
I don't see this error in old apache httpd version, the new apache package has included apr source code under folder srclib, so if you see this error, just add with ./configure
当您下载 Apache (
httpd 2.4
) 时,有一个名为/srclib
的目录。使用 cd /srclib cd 进入该目录。打开浏览器并转到 http://apr.apache.org/download.cgi 并下载将 .apr 文件复制到该目录中。
解压并将其解压到 srclib 目录中。解压后,确保将其重命名为“apr”;示例:
现在,它应该从该文件夹读取
.apr
文件。之后它也会请求apr-utils
;确保遵循相同的程序。PS:
/usr/local
中的apr文件是已经构建好的文件。所以他们不会工作。When you download Apache (
httpd 2.4
), there is a directory which is called/srclib
.cd into that directory with
cd /srclib
. Open your browser and go to http://apr.apache.org/download.cgi and download the .apr files into the directory.Unzip and extract it into srclib directory. After extracting, make sure you rename it just "apr"; example:
Now, it should read the
.apr
files from that folder. After that it will ask forapr-utils
too; make sure you follow the same procedure.PS: The apr files in
/usr/local
are files which are already built. so they won't work.您需要安装apr-util-1.5.4
从archive.apache.org
you need to install apr-util-1.5.4
Download it from archive.apache.org
查看文档,您似乎应该将顶级目录作为 with-apr 和 with-apr-util 选项的参数。
试试这个:
Looking at the documentation it appears the you should be giving the top level directory as the argument for the with-apr and with-apr-util options.
Try this:
如果您已安装捆绑的 apr 和 apu(确保安装了 libapr1-dev 和 libaprutil1-dev),请不要为 apr 传递任何参数。
如果您想使用 srcdir 中包含的 apr 和 apu,则添加
--with-included-apr
作为参数就足够了。外部编译的 apr/apu 当前有错误。如果您想拥有最新版本,请更新源代码并重新编译。If you have bundled apr and apu installed (make sure you libapr1-dev and libaprutil1-dev installed), don't pass any argument for apr.
If you want to use the apr and apu included in srcdir,
--with-included-apr
will be enough to add as argument. Externally compiled apr/apu currently buggy. Update your source code and re-compile if you want to have up to date version.我发现我在 Solaris 11 下使用 httpd-2.2.22 遇到了这个问题。我的 config.log 显示测试 apr-util 版本的程序产生了编译错误,因为 apu_version.h 包含 apr_version.h,但测试程序没有包含 apr include 目录的 -I 指令。我通过在 CPPFLAGS 中显式提供 apr include 指令来解决这个问题。适应您的示例,它看起来像这样:
请注意,我还修改了您的 --with-apr 和 --with-apr-util 子句。我认为这些都应该指向顶级目录而不是配置程序。 YMMV。
I found I experienced this problem under Solaris 11 with httpd-2.2.22. My config.log showed that the program testing the apr-util version produced a compile error because apu_version.h includes apr_version.h, but the test program did not include a -I directive for the apr include directory. I worked around this problem by providing the apr include directive explicitly in CPPFLAGS. Adapted to your example it would look like this:
Note that I have also modified your --with-apr and --with-apr-util clauses. I think these should both point to the top-level directory and not to the config program. YMMV.
最后我找到了解决这个问题的解决方案。
请使用以下方式配置 apr-util
从 apache.org 下载 apr 和 apr-util 并解压并首先编译 apr。
转到提取的apr路径并编译apr。
例如:
接下来使用 apr 编译 apr util
,并在最终安装时使用相同的 apr 路径 示例:
Finally i found a solution to resolve this issue.
Please configure apr-util using as below
Download apr and apr-util from apache.org and untar it and compile apr first.
Go to extracted apr path and compile apr.
Ex:
Next complile apr util using apr
and use the same apr path at final installation aswell Ex: