安装 php 后启动 apache 报错:
httpd: Syntax error on line 149 of /usr/local/apache2/conf/httpd.conf: Cannot load modules/libphp5.so into server: /usr/local/apache2/modules/libphp5.so: undefined symbol: xmlTextReaderSetup
编译命令如下:
./configure --prefix=/usr/local/php --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql --with-zlib-dir=/usr/lib --with-libxml-dir=/usr/local/libxml2
--with-freetype-dir=/usr/local/freetype --with-mcrypt=/usr/local/mcrypt --with-gd --with-curl=/usr/local/curl --with-jpeg-dir=/usr/local/jpeg6b --with-png-dir=/usr/local/libpng --enable-ftp --enable-zip --enable-mbstring=all --enable-sockets
经排查,是红色部分命令的 mcrypt 包有问题,删掉 php 目录,再重新安装,编译时去掉这一句即可。原因以后再补充