centos7编译安装php7我遇到的错误

 

关于php.ini

1、如果是rpm包安装的,默认配置文件是/etc/php.ini。
2、如果是源码包安装的,需要自己到源码包的目录下复制一个php.ini-development或者php.ini-production到php的配置文件所在目录,并改名为php.ini。

 

 

 

关于centos7安装php7请参考

http://www.jb51.net/article/109228.htm

 

 

错误1:Cannot find OpenSSL's <evp.h>

解决:yum install openssl openssl-devel

ln -s /usr/lib64/libssl.so /usr/lib/

 

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

解决:libxml2已经安装,还报这个错误,还需要安装libxml2-devel

 

错误3:error: Please reinstall the BZip2 distribution

解决:yum -y install bzip2-devel

 

错误4:checking for cURL in default path... not found

解决:yum -y install curl-devel

 

5:configure: error: jpeglib.h not found.

:yum -y install libjpeg-devel

 

6:configure: error: png.h not found.

:yum -y install libpng-devel

 

7:Configure: error: freetype.h not found.

:yum install freetype-devel

 

8:configure: error: Unable to locate gmp.h

:yum -y install gmp-devel

 

9:configure: error: mcrypt.h not found. Please reinstall libmcrypt.

:wget https://nchc.dl.sourceforge.net/project/mcrypt/Libmcrypt/2.5.8/libmcrypt-2.5.8.tar.gz

tar zxflibmcrypt-2.5.8.tar.gz

cdlibmcrypt-2.5.8

./configure

make && make install

 

10:configure: error: Don't know how to define struct flock on this system, set --enable-opcache=no

:编辑 /etc/ld.so.conf 加入/usr/local/lib,在执行ldconfig。

这个比较麻烦,参考http://www.68idc.cn/help/jiabenmake/qita/2014022169481.html

 

11:configure: error: Please reinstall readline - I cannot find readline.h

 :yum -y install readline-devel

 

12:configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution

:yum -y install libxslt-devel

 

13:更多问题请参考http://www.bkjia.com/PHPjc/1008013.html

Thank you for using PHP.

linux装个php经历九九八十一难

 

 

 

 

 

 

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值