1

我目前正在尝试生成一个修补过的 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我在邮件列表中找到了一些答案,这些答案说明了实际存在的缺失选项。

4

1 回答 1

0

我在 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-02-28T03:12:47.307 回答