我目前正在尝试生成修补的apache2 2.4.3
的RPM包我修改了随档案提供的httpd.spec,使用SVR版本的APR(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
。
答案 0 :(得分: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中找到dev包:
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