启动 httpd 报错:
symbol lookup error: /usr/local/apache2/bin/httpd: undefined symbol: apr_ldap_ssl_init
参考:https://blog.csdn.net/lyjtynet/article/details/6008977
参考:https://blog.csdn.net/cheng_fangang/article/details/8126733
参考:https://ubuntuforums.org/showthread.php?t=1029393
然鹅我发现是因为不小心yum安装了httpd,与编译安装的混乱了。于是重新编译,报错消失。
查看apr情况:
/usr/local/apache2/bin/httpd -V
输出:
Server version: Apache/2.2.34 (Unix) Server built: Aug 1 2020 11:18:09 Server's Module Magic Number: 20051115:43 Server loaded: APR 1.4.8, APR-Util 1.5.2 Compiled using: APR 1.4.8, APR-Util 1.5.2
重新编译 apr1.4.8 + apr-utils1.5.2 :
wget http://archive.apache.org/dist/apr/apr-1.4.8.tar.bz2 && tar -xjvf apr-1.4.8.tar.bz2 && cd apr-1.4.8 && ./configure --prefix=/usr --disable-static --with-installbuilddir=/usr/share/apr-1/build && make && make install wget http://archive.apache.org/dist/apr/apr-util-1.5.2.tar.bz2 && tar -xjvf apr-util-1.5.2.tar.bz2 && cd apr-util-1.5.2 && ./configure --prefix=/usr --with-apr=/usr --with-gdbm=/usr --with-openssl=/usr --with-crypto && make && make install
重新编译 apache2 :
wget http://archive.apache.org/dist/httpd/httpd-2.2.34.tar.gz && tar -zxvf httpd-2.2.34.tar.gz && cd httpd-2.2.34 ./configure --prefix=/usr/local/apache2 --enable-so --enable-mods-shared=most --with-crypto --enable-rewrite --enable-headers --enable-deflate --enable-socache-shmcb --enable-negotiation --enable-ssl --with-ssl=/usr/lib --with-apr=/usr/bin/apr-1-config --with-apr-util=/usr/bin/apu-1-config make && make install
重启 httpd ,错误消失。