文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>rhelas3安装php5遇到的一系列问题

rhelas3安装php5遇到的一系列问题

时间:2006-03-20  来源:heavyrain

安装php5遇到的问题: ./configure后出现 Configuring extensions
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.
  说明libxml2版本比较低 用apt-get install libxml2
apt-get install libxml2-level 更新包后还是不行
  搜索后发现问题可能是: [root@heavyrain bin]# ls  -l  /usr/lib/libxml2.*
-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:                                                           |
| This software is subject to the PHP License, available in this     |
| distribution in the file LICENSE.  By continuing this installation |
| process, you are bound by the terms of this license agreement.     |
| If you do not agree with the terms of this license, you must abort |
| the installation process at this point.                            |
+--------------------------------------------------------------------+

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



相关阅读 更多 +
排行榜 更多 +
Event Horizon

Event Horizon

飞行射击 下载
Counter Terrorist Sniper Shoot

Counter Terrorist Sniper Shoot

飞行射击 下载
Special Agent

Special Agent

飞行射击 下载