【问题标题】:Error while building apache2 2.4.3 with mod_authnz_ldap and apr/apr-util使用 mod_authnz_ldap 和 apr/apr-util 构建 apache2 2.4.3 时出错
【发布时间】:2012-09-18 03:06:01
【问题描述】:

我目前正在尝试生成一个修补过的 apache2 2.4.3 的 RPM 包

我修改了存档提供的httpd.spec,以使用APR的SVN版本(CentOS不提供1.4版):

%build
# forcibly prevent use of bundled apr, apr-util, pcre
rm -rf srclib/{apr,apr-util,pcre}

svn co http://svn.apache.org/repos/asf/apr/apr/trunk srclib/apr

./buildconf
%configure \
        --enable-layout=RPM \
        --libdir=%{_libdir} \
        --sysconfdir=%{_sysconfdir}/httpd/conf \
        --includedir=%{_includedir}/httpd \
        --libexecdir=%{_libdir}/httpd/modules \
        --datadir=%{contentdir} \
        --with-installbuilddir=%{_libdir}/httpd/build \
        --enable-mpms-shared=all \
        --with-included-apr \
        --enable-suexec --with-suexec \
        --with-suexec-caller=%{suexec_caller} \
        --with-suexec-docroot=%{contentdir} \
        --with-suexec-logfile=%{_localstatedir}/log/httpd/suexec.log \
        --with-suexec-bin=%{_sbindir}/suexec \
        --with-suexec-uidmin=500 --with-suexec-gidmin=100 \
        --enable-pie \
        --with-pcre \
        --with-libxml2 \
        --enable-mods-shared=all \
        --enable-ssl --with-ssl --enable-socache-dc --enable-bucketeer \
        --enable-case-filter --enable-case-filter-in \
        --enable-session-crypto --with-crypto \
        --enable-ldap --enable-authnz-ldap --with-ldap \
        --disable-imagemap

重要的部分是:

        --with-included-apr \
        --enable-ldap --enable-authnz-ldap --with-ldap \

当我生成包时:

rpmbuild -ba ~/rpmbuild/SPECS/httpd.spec

我收到以下错误:

checking for ldap support in apr/apr-util... no
configure: WARNING: apr/apr-util is compiled without ldap support
checking whether to enable mod_authnz_ldap... configure: error: mod_authnz_ldap has been requested but can not be built due to prerequisite failures

我在邮件列表中找到了一些关于缺少选项 --with-ldap 的答案,该选项实际上存在。

【问题讨论】:

  • 你有安装openldap开发包吗?此外,当您的构建运行 APR 配置脚本(与主 Apache 脚本分开)时,它是否说明了检测 LDAP 库的任何内容?

标签: apache centos rpm apr mod-ldap


【解决方案1】:

我在 Ubuntu 13.10 中配置 Apache2 httpd-2.4.7 时遇到了同样的问题。您应该确保已安装 OpenLDAP。在 Ubuntu 中:

sudo apt-get install sladp ldap-utils

就我而言,这并没有解决问题,所以我安装了开发版本:

sudo apt-cache search openldap #found libldap2-dev
sudo apt-get install libldap2-dev

我认为您可以使用以下命令在 rpm 中找到开发包:

rpm -qa | grep ldap

然后使用 '--with-ldap' 配置 httpd 为我解决了这个问题。

./configure --prefix=/usr/local/apache --sysconfdir=/etc/apache --enable-so --with-ldap --enable-ssl --with-included-apr --with-pcre=/usr/local/pcre

【讨论】:

    猜你喜欢
    • 2014-06-09
    • 1970-01-01
    • 2017-08-30
    • 2013-01-03
    • 1970-01-01
    • 2023-03-21
    • 1970-01-01
    • 2010-12-01
    • 2013-08-08
    相关资源
    最近更新 更多