Home > Backend Development > PHP Tutorial > PhP 常见安装错误configure error xml2-config not found. p

PhP 常见安装错误configure error xml2-config not found. p

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-21 08:45:46
Original
1201 people have browsed it

configure error xml2-config not found. please check your libxml2 installation

sendos 5.5 安装 PHP 5.4.3 报 configure error xml2-config not found. please check your libxml2 installation 错误

检查是否安装了libxm包

[root@rh-linux software]# rpm -qa |grep  libxml2

libxml2-2.6.26-2.1.12

libxml2-python-2.6.26-2.1.12

重新安装libxml2和libxml2-devel包, yum安装的时候发现新版本会提示更新,需要更新的可以更新,不要跳过就行了。

[root@rh-linux /]# yum install libxml2

[root@rh-linux /]# yum install libxml2-devel -y

安装完之后查找xml2-config文件是否存在

[root@rh-linux /] # find / -name "xml2-config"

/usr/bin/xml2-config

 

如果存在的话重新安装php

[root@rh-linux  php-5.4.3]# ./configure

[root@rh-linux  php-5.4.3]# make

[root@rh-linux  php-5.4.3]# make install

安装好php后别忘了配置下php.ini 文件, 

[root@rh-linux php-5.4.3]# cp php.ini-production /usr/local/lib/php.ini

也可以直接在 make install 后面加一个编译参数 --with-config-file-path=/usr/local/php/etc 指定自己的php.ini路径 然后从源码里面 cp过去php.ini 源码里面有个php.ini-development和php.ini-production 如果不是本地调试模式的 选择后者

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template