配置:错误:需要 APR-util 版本 1.2.0 或更高版本

发布于 2024-12-13 00:26:57 字数 480 浏览 5 评论 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(7

违心° 2024-12-20 00:26:57

我在旧的 apache httpd 版本中没有看到这个错误,新的 apache 包在文件夹 srclib 下包含了 apr 源代码,所以如果你看到这个错误,只需添加 ./configure

--with-apr=$APACHE_SOURCE/srclib --with-apr-util=$APACHE_SOURCE/srclib  --with-included-apr

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

--with-apr=$APACHE_SOURCE/srclib --with-apr-util=$APACHE_SOURCE/srclib  --with-included-apr
山色无中 2024-12-20 00:26:57

当您下载 Apache (httpd 2.4) 时,有一个名为 /srclib 的目录。

使用 cd /srclib cd 进入该目录。打开浏览器并转到 http://apr.apache.org/download.cgi 并下载将 .apr 文件复制到该目录中。

wget <link>

解压并将其解压到 srclib 目录中。解压后,确保将其重命名为“apr”;示例:

mv apr.1.5.1 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.

wget <link>

Unzip and extract it into srclib directory. After extracting, make sure you rename it just "apr"; example:

mv apr.1.5.1 apr 

Now, it should read the .apr files from that folder. After that it will ask for apr-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.

七秒鱼° 2024-12-20 00:26:57

您需要安装apr-util-1.5.4

archive.apache.org

./configure --prefix=/usr/local/src/httpd-2.4.17/srclib/apr-util/ --with-apr=/usr/local/src/httpd-2.4.17/srclib/apr/

you need to install apr-util-1.5.4

Download it from archive.apache.org

./configure --prefix=/usr/local/src/httpd-2.4.17/srclib/apr-util/ --with-apr=/usr/local/src/httpd-2.4.17/srclib/apr/
一瞬间的火花 2024-12-20 00:26:57

查看文档,您似乎应该将顶级目录作为 with-apr 和 with-apr-util 选项的参数。

试试这个:

./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --enable-so --enable-dav --enable-maintainer-mode --enable-rewrite

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:

./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --enable-so --enable-dav --enable-maintainer-mode --enable-rewrite
情感失落者 2024-12-20 00:26:57

如果您已安装捆绑的 apr 和 apu(确保安装了 libapr1-dev 和 libaprutil1-dev),请不要为 apr 传递任何参数。

./configure --prefix=/usr/local/apache --enable-so --enable-dav --enable-maintainer-mode --enable-rewrite

如果您想使用 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.

./configure --prefix=/usr/local/apache --enable-so --enable-dav --enable-maintainer-mode --enable-rewrite

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.

清秋悲枫 2024-12-20 00:26:57

我发现我在 Solaris 11 下使用 httpd-2.2.22 遇到了这个问题。我的 config.log 显示测试 apr-util 版本的程序产生了编译错误,因为 apu_version.h 包含 apr_version.h,但测试程序没有包含 apr include 目录的 -I 指令。我通过在 CPPFLAGS 中显式提供 apr include 指令来解决这个问题。适应您的示例,它看起来像这样:

CPPFLAGS="-I/usr/local/apr/include" ./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-so --enable-dav --enable-maintainer-mode --enable-rewrite

请注意,我还修改了您的 --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:

CPPFLAGS="-I/usr/local/apr/include" ./configure --prefix=/usr/local/apache --with-apr=/usr/local/apr --with-apr-util=/usr/local/apr-util --enable-so --enable-dav --enable-maintainer-mode --enable-rewrite

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.

翻身的咸鱼 2024-12-20 00:26:57

最后我找到了解决这个问题的解决方案。
请使用以下方式配置 apr-util
从 apache.org 下载 apr 和 apr-util 并解压并首先编译 apr。
转到提取的apr路径并编译apr。
例如:

./configure --prefix=/usr/apache/apache.2.4.55/apr
make
make test
make install

接下来使用 apr 编译 apr util

./configure --with-apr=/usr/apache/apache.2.4.55/apr/bin/apr-1-config

,并在最终安装时使用相同的 apr 路径 示例:

./configure --prefix=/usr/apache/apache.2.4.55 --with-apr-util=/usr/apache/apache.2.4.55/apr-util/ --with-apr=/usr/apache/apache.2.4.55/apr/bin/apr-1-config  --enable-so --enable-mods-shared=all --enable-proxy --enable-rewrite --disable-deflate --with-ldap-include=/usr/apache/apache.2.4.55/ldap/include --with-ldap-lib=/usr/apache/apache.2.4.55/ldap/lib --with-ldap --enable-ldap --with-ldap-sasl --with-pcre=/usr/apache/apache.2.4.55/pcre/bin/pcre-config --with-ssl=/usr/apache/apache.2.4.55/ssl --enable-ssl --enable-so

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:

./configure --prefix=/usr/apache/apache.2.4.55/apr
make
make test
make install

Next complile apr util using apr

./configure --with-apr=/usr/apache/apache.2.4.55/apr/bin/apr-1-config

and use the same apr path at final installation aswell Ex:

./configure --prefix=/usr/apache/apache.2.4.55 --with-apr-util=/usr/apache/apache.2.4.55/apr-util/ --with-apr=/usr/apache/apache.2.4.55/apr/bin/apr-1-config  --enable-so --enable-mods-shared=all --enable-proxy --enable-rewrite --disable-deflate --with-ldap-include=/usr/apache/apache.2.4.55/ldap/include --with-ldap-lib=/usr/apache/apache.2.4.55/ldap/lib --with-ldap --enable-ldap --with-ldap-sasl --with-pcre=/usr/apache/apache.2.4.55/pcre/bin/pcre-config --with-ssl=/usr/apache/apache.2.4.55/ssl --enable-ssl --enable-so
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文