PHP安装容易遇到的问题,安装php遇到一些常见问题

今天用centos6.5 安装PHP,遇到了一些问题;之前在另外一个版本安装都很顺利,我怀疑系统版本有问题;

[root@wiki2014 php-5.2.13]#  ./configure --prefix=/usr/local/php5 --with-apxs2=/usr/local/apache2/bin/apxs --with-mysql=/usr/local/mysql/ --with-mysqli=/usr/local/mysql/bin/mysql_config --with-pdo-mysql=/usr/local/mysql/ --enable-soap --with-gd --enable-sockets --enable-mbstring --disable-ipv6 --enable-exif --with-zlib --with-curl -with-curlwrappers --enable-calendar --with-gettext --enable-gd-native-ttf --enable-zend-multibyte --with-bz2  --with-jpeg-dir --with-png-dir --with-freetype-dir --with-iconv-dir --with-libxml-dir

...............

第一遍

checking for xml2-config path...

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

解决方法

[root@wiki2014 php-5.2.13]#yum -y install libxml2-devel

........................................

checking for BZip2 in default path... not found

configure: error: Please reinstall the BZip2 distribution

解决方法

[root@wiki2014 soft]# yum install bzip2 bzip2-devel

............

checking for cURL in default path... not found

configure: error: Please reinstall the libcurl distribution -

easy.h should be in /include/curl/

[root@wiki2014 soft]# yum install curl curl-devel

...............

configure: error: libjpeg.(a|so) not found.

解决方法

[root@wiki2014 soft]# yum install libjpeg-devel

[root@wiki2014 soft]# ln -s /usr/lib64/libjpeg.so /usr/lib/libjpeg.so

...................

checking for jpeg_read_header in -ljpeg... yes

configure: error: libpng.(a|so) not found.

[root@wiki2014 soft]# locate libpng.so

/usr/lib64/libpng.so.3

/usr/lib64/libpng.so.3.49.0

/usr/lib64/compiz/libpng.so

[root@wiki2014 soft]# rpm -q libpng

libpng-1.2.49-1.el6_2.x86_64

[root@wiki2014 soft]# rpm -q libpng-devel

package libpng-devel is not installed

[root@wiki2014 soft]# yum install libpng-devel

[root@wiki2014 soft]# updatedb

[root@wiki2014 soft]# locate libpng.so

/usr/lib64/libpng.so

/usr/lib64/libpng.so.3

/usr/lib64/libpng.so.3.49.0

/usr/lib64/compiz/libpng.so

[root@wiki2014 usr]# ln -s /usr/lib64/libpng.so /usr/lib/libpng.so

.......................

configure: error: freetype.h not found.

[root@wiki2014 usr]# yum install freetype-devel

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值