Linux

找不到 Apache 2.4 的 ldap 庫

  • September 15, 2017

我正在嘗試配置 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 我沒有任何錯誤。

任何的想法?

謝謝!

我發現了問題,沒有帶openssl庫依賴。只需導出庫:export LD_LIBRARY_PATH = “/opt/lib/openssl-1.1.0f/lib/”

謝謝大家支持

引用自:https://serverfault.com/questions/873783