标签:
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 如果不是本地调试模式的 选择后者
Installing shared extensions: /opt/modules/php/lib/php/extensions/no-debug-non-zts-20131226/
Installing PHP CLI binary: /opt/modules/php/bin/
Installing PHP CLI man page: /opt/modules/php/php/man/man1/
Installing PHP CGI binary: /opt/modules/php/bin/
Installing PHP CGI man page: /opt/modules/php/php/man/man1/
Installing build environment: /opt/modules/php/lib/php/build/
Installing header files: /opt/modules/php/include/php/
Installing helper programs: /opt/modules/php/bin/
program: phpize
program: php-config
Installing man pages: /opt/modules/php/php/man/man1/
page: phpize.1
page: php-config.1
Installing PEAR environment: /opt/modules/php/lib/php/
[PEAR] Archive_Tar - installed: 1.4.0
[PEAR] Console_Getopt - installed: 1.4.1
[PEAR] Structures_Graph- installed: 1.1.1
[PEAR] XML_Util - installed: 1.3.0
[PEAR] PEAR - installed: 1.10.1
Wrote PEAR system config file at: /opt/modules/php/etc/pear.conf
You may want to add: /opt/modules/php/lib/php to your php.ini include_path
/opt/modules/src/php-5.6.22/build/shtool install -c ext/phar/phar.phar /opt/modules/php/bin
ln -s -f phar.phar /opt/modules/php/bin/phar
Installing PDO headers: /opt/modules/php/include/php/ext/pdo/
标签:
原文地址:http://www.cnblogs.com/mogujiang/p/5547146.html