我正在尝试配置 Apache 版本 2.4.27 并启用 ldap。我也安装了这个库,没有错误:
./config --prefix=/opt/lib/openssl-1.1.0f shared
make depend, make, make install
CPPFLAGS="-I/opt/lib/openssl-1.1.0f/include" LDFLAGS="-Lopt/lib/openssl-1.1.0f/lib" ./configure --prefix=/opt/lib/openldap-2.4.45 --disable-slapd --with-tls=openssl
make depend, make, make install
./configure --prefix=/opt/lib/curl-7.54.1 --with-ssl=/opt/lib/openssl-1.1.0f
make, make install
./configure --prefix=/opt/lib/pcre-8.41
make, make install
./configure CFLAGS=-DXML_POOR_ENTROPY --prefix=/opt/lib/expat-2.2.2
make, make install
下面是配置httpd-2.4.27的命令:
./configure --prefix=/opt/httpd-2.4.27 --with-included-apr --with-pcre=/opt/lib/pcre-8.41/ --with-ssl=/opt/lib/openssl-1.1.0f --enable-so --with-expat=/opt/lib/expat-2.2.2 --enable-suexec --with-openssl=/opt/lib/openssl-1.1.0f --with-ldap-include=/opt/lib/openldap-2.4.45/include --with-ldap-lib=/opt/lib/openldap-2.4.45/lib --with-crypto --with-ldap --enable-authnz-ldap
我将 APR(1.6.2) APR-util(1.6.0) 文件放在 srclib 目录中。在 ./configure 期间,我出现以下错误:
checking for ldap support...
adding "-I/opt/lib/openldap-2.4.45/include" to APRUTIL_INCLUDES
adding "-L/opt/lib/openldap-2.4.45/lib" to APRUTIL_LDFLAGS
checking for ldap_init in -lldap50... no
checking for ldap_init in -lldapssl41... no
checking for ldap_init in -lldapssl40... no
checking for ldap_init in -lldapssl30... no
checking for ldap_init in -lldapssl20... no
checking for ldap_init in -lldapsdk... no
checking for ldap_init in -lldapsdk... no
checking for ldap_init in -lldap... no
checking for ldap_init in -lldap... no
checking for ldap_init in -lldap... no
checking for ldap_init in -lldap... no
configure: error: could not find an LDAP library
configure failed for srclib/apr-util
没有 LDAP 我就没有任何错误。
任何想法?
谢谢!
答案1
我发现问题所在,没有带openssl库依赖项。只需导出库:export LD_LIBRARY_PATH =“/opt/lib/openssl-1.1.0f/lib/”
感谢大家的支持