重装mysql+apache+php,configure php的时候得到错误信息
shell#./configure --with-mysql=/usr/lib/mysql --with-apxs2=/usr/local/apache/bin/apxs --prefix=/usr/local/php
configure: error: xml2-config not found. Please check your libxml2 installation.
错误原因,xml2-config这个文件没找到。
/*原因可能出在我这次安装redhat,有很多东西没选上,所以出此问题。*/
根据错误提示,安装libxml2。RHEL_5.2的安装光盘上提供了很多rpm包,我的是dvd光盘,位置在/media/RHEL_5.2 i386 DVD/Server,
cd /media/RHEL_5.2 i386 DVD/Server
ls *libxml*
[root@localhost Server]# ls *libxml*
libxml2-2.6.26-2.1.2.1.i386.rpm libxml2-python-2.6.26-2.1.2.1.i386.rpm
libxml2-devel-2.6.26-2.1.2.1.i386.rpm perl-libxml-perl-0.08-1.2.1.noarch.rpm
[root@localhost Server]# rpm -ivh libxml2-python-2.6.26-2.1.2.1.i386.rpm
warning: libxml2-python-2.6.26-2.1.2.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
package libxml2-python-2.6.26-2.1.2.1 is already installed /*提示我已经安装过了*/
[root@localhost Server]# rpm -ivh libxml2-devel-2.6.26-2.1.2.1.i386.rpm
warning: libxml2-devel-2.6.26-2.1.2.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
error: Failed dependencies:
zlib-devel is needed by libxml2-devel-2.6.26-2.1.2.1.i386
[root@localhost Server]# ls *zlib-devel*
zlib-devel-1.2.3-3.i386.rpm
[root@localhost Server]# rpm -ivh zlib-devel-1.2.3-3.i386.rpm
warning: zlib-devel-1.2.3-3.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:zlib-devel ########################################### [100%]
[root@localhost Server]# rpm -ivh libxml2-devel-2.6.26-2.1.2.1.i386.rpm
warning: libxml2-devel-2.6.26-2.1.2.1.i386.rpm: Header V3 DSA signature: NOKEY, key ID 37017186
Preparing... ########################################### [100%]
1:libxml2-devel ########################################### [100%]
[root@localhost Server]#
好了,没有问题了,
make
make install
安装完成