checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path... /usr/bin/xml2-config
configure: error: libxml2 version 2.6.11 or greater required.
apt-get install libxml2-level 更新包后还是不行
-rw-r--r-- 1 root root 1132232 Feb 29 2004 /usr/lib/libxml2.a
-rwxr-xr-x 1 root root 708 Feb 29 2004 /usr/lib/libxml2.la
lrwxrwxrwx 1 root root 16 Mar 19 22:22 /usr/lib/libxml2.so -> l
ibxml2.so.2.5.4
lrwxrwxrwx 1 root root 16 Mar 19 21:54 /usr/lib/libxml2.so.2 ->
libxml2.so.2.5.4
-rwxr-xr-x 1 root root 954820 Feb 29 2004 /usr/lib/libxml2.so.2.5.4
下载更新libxml
rpm -Uvh libxml2-2.6.23-1.2.i386.rpm --nodeps
rpm -Uvh libxml2-devel-2.6.23-1.2.i386.rpm --nodeps
再次./configure
报错误变为:
Configuring extensions
checking whether to enable LIBXML support... yes
checking libxml2 install dir... no
checking for xml2-config path... /usr/bin/xml2-config
checking whether libxml build works... no
configure: error: build test failed. Please check the config.log for details.
怀疑是路径问题,但是还没解决
./configure --prefix=/usr/local/php -with-mysql=/var/lib/mysql --with-libxml-dir=/usr/lib/include/libxml2/libxml
反复安装几次都不行,决定重新编译安装libxml
下载并安装libxml2-sources-2.6.23.tar.gz
根据libxml新安装路径-with-xml2-config=/usr/local/lib进行配置:
./configure --prefix=/usr/local/php -with-mysql=/var/lib/mysql -with-xml2-config=/usr/local/lib |
原来的错误没有出现,但报了新错误:
configure: error: Try adding --with-zlib-dir=<DIR>. Please check config.log for more information. |
重新安装 zlib-1.2.3.tar.gz
确定相关软件目录:
./configure --prefix=/usr/local/php --with-mysql-dir=/home/heavyrain/mysql-max-3.23.58-pc-linux-i686 --with-xml2-config=/usr/local/lib --with-zlib-dir=/usr/local/zlib2/ |
终于成功了!
| License: | Thank you for using PHP. |
make时出现
ext/standard/basic_functions.o(.data+0xe38): In function `zif_getenv':
/home/liuzhen/php-5.1.2RC2/ext/standard/basic_functions.c:1413: undefined reference to `zif_log1p'
collect2: ld returned 1 exit status
make: *** [sapi/cgi/php] Error 1
make install