Linux下php5.3.6的安装:checking whether libxml build works... no
来源:互联网 发布:港式车仔面图片淘宝 编辑:程序博客网 时间:2024/06/16 06:54
php下载
# cd /usr/local/src/
# wget http://cn.php.net/get/php-5.3.6.tar.gz/from/this/mirror
php安装
# tar -zxvf php-5.3.6.tar.gz
# cd php-5.3.6
# ./configure--prefix=/usr/local/php5.3.6 --with-mysql=/usr/local/mysql5.5.9--with-apxs2=/usr/sbin/apxs --enable-mbstring--with-config-file-path=/usr/local/php5.3.6/etc
# make
# make install
ps:
--prefix=/usr/local/php5.3.6 指定php安装目录;
--with-mysql=/usr/local/mysql5.5.9 指定mysql安装目录;
--with-apxs2=/usr/sbin/apxs 指定查找Apache2的地方;
--with-config-file-path=/usr/local/php5.3.6/etc 指定php的配置文件目录
php的设定
# cp -pr php.ini-development php.ini
编辑php.ini
# vi php.ini
default_charset = "UTF-8"
extension_dir = "./ext"
extension=php_mbstring.dll
[mbstring]
mbstring.language = Japanese
mbstring.internal_encoding = UTF-8
mbstring.http_output = UTF-8
Apache的设定
# vi /etc/httpd/conf/httpd.conf
AddType application/x-httpd-php .php
DirectoryIndex index.html index.htm index.html.var index.php没有如下的文字,追加
LoadModule php5_module /usr/lib/httpd/modules/libphp5.so
# /etc/init.d/httpd restart
遇到的问题与解决方案
问题一:
./configure以下错误发生
Sorry, I cannot run apxs.Possiblereasons follow: 1. Perl is not installed
2. apxs was not found. Try to pass the path using--with-apxs2=/path/to/apxs
3. Apache was not built using --enable-so (the apxs usage page isdisplayed)
解决方法:指定正确的apxs路径
1.查找apxs路径
# whereis apxs
apxs:
说明系统没有安装apxs扩展工具
2.安装apxs
# yum install httpd-devel
3.查找apxs路径
# whereis apxs
apxs: /usr/sbin/apxs /usr/share/man/man8/apxs.8.gz
apxs安装成功
问题二:
安装apxs以下错误发生:
Package cyrus-sasl-plain needs cyrus-sasl-lib = 2.1.22-4, thisis not available.
解决方法:
#
之后再次安装apxs
问题三:
再次./configure以下错误发生
configure: error: xml2-config not found. Please check your libxml2installation.
解决方法:
安装libxml2
# yum install libxml2-devel
问题四:
hecking libxml2 install dir... no
checking for xml2-config path... /usr/bin/xml2-config
checking whether libxml build works... no
configure: error: build test failed.
解决方法:
# yum erase zlib-devel
# yum install zlib-devel
# yum install libxml2-devel
参考资料:
http://www.howtoforge.com/forums/showthread.php?t=25933&highlight=checking+libxml+build
- Linux下php5.3.6的安装:checking whether libxml build works... no
- NetCDF安装:checking whether the C compiler works... no
- checking whether the C++ compiler works... no
- mac编译apache时出现 checking whether the C compiler works... no 的解决办法
- ubuntu curl失败checking whether the C compiler works... no
- C compiler cannot create executables checking whether the C compiler works... no
- checking whether the C++ compiler works... no configure: error: in `/root/gperftools-2.1': configure
- linux下libxml工具的安装
- linux下libxml工具的安装
- linux下libxml工具的安装
- linux下libxml工具的安装
- linux下libxml库的安装及编译
- Linux 下安装libxml出现cannot remove `libtoolT': No such file or directory Done
- linux安装mongo c++ driver,出现Checking for C++ library boost_thread-mt... no的解决办法
- 【Linux】【libxml】Linux(Ubuntu10.04 )下libxml2的安装以及使用示例
- LINUX下安装PHP5扩展
- PHP5在Linux下安装
- linux下安装php5.6
- 欢迎使用CSDN-markdown编辑器
- HDU杭电 1039 Easier Done Than Said?(字符串问题)
- Ubuntu 下安装 octave 4.0
- 依赖项属性概述 wpf
- wxhl ios bj 49 张浩 学习心得连载 第二章
- Linux下php5.3.6的安装:checking whether libxml build works... no
- 【BZOJ】1213 高精度开根
- 杭电ACM1277——全文检索~~AC自动机算法
- route , 双网卡实现同时访问内外网。
- leetcode笔记:3Sum Closest
- 二零一五年七月二十二 工作总结
- 中文输入输出
- 流、文件、目录操作
- Away3D 实现场景中的倒计时