apache 安装/mod_dir.so: undefined symbol: apr_array_clear
apache 安装好后 启动出错:
httpd: Syntax error on line 143 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/mod_dir.so into server: /usr/local/apache2/modules/mod_dir.so: undefined symbol: apr_array_clear
由于 apache编译时没有指定 --with-included-apr 参数
可是重新编译时又发现问题:
执行配置安装httpd时出错
configure: error: Bundled APR requested but not found at ./srclib/. Download and unpack the corresponding apr and apr-util packages to ./srclib/.
是由于:需要下载apr和apr-utils 并解压到./srclib/, 再进行编译
cp -R /tmp/apr-1.5.1 /tmp/httpd-2.4.10/srclib/apr
cp -R /tmp/apr-util-1.5.4 /tmp/httpd-2.4.10/srclib/apr-util
再编译:
./configure --prefix=/usr/local/httpd/ --with-apr=/usr/local/apr/ --with-apr-util=/usr/local/apr-util/ --with-pcre=/usr/local/pcre/ --with-included-apr
OK,然后启动服务