apache - 使用 mod_authnz_ldap 和 apr/apr-util 构建 apache2 2.4.3 时出错

标签 apache centos rpm apr mod-ldap

我目前正在尝试生成一个修补过的 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这实际上是存在的。

最佳答案

我在 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

关于apache - 使用 mod_authnz_ldap 和 apr/apr-util 构建 apache2 2.4.3 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12602579/

相关文章:

php - Vagrant 命令未运行,正在安装开发机

PHP 启动 : Unable to load dynamic library 'phalcon.so'

java - 从java获取接口(interface)名称

linux - Zend Framework 2 中公用文件夹的最佳设置是什么?

apache - Vagrant Share - 访问虚拟主机并访问那些不在默认 Web 根目录中的主机

php - APC 文件缓存不工作,但用户缓存正常

linux - 需要一些帮助来为 nodejs 应用程序创建 rpm 包

Kubernetes.default nslookup 无法从不同的命名空间解析

linux - 构建具有 RPM 升级 future 前景的 Docker 镜像

linux - 如何在 rpm 中更改 "Build Host"