centos7下安装php7

大致的过程参考了这篇文章:点击打开链接

但因为具体环境的不同,在配置的时候遇到的实际问题不太一样。

在执行./configure xxxxxxxxxxxxxxxxx的时候遇到了各种缺失的包:


1. 缺少libxml2:

checking whether to enable LIBXML support... yes
checking libxml2 install dir... yes
checking for xml2-config path... 
configure: error: xml2-config not found. Please check your libxml2 installation.

yum安装:

# yum -y install libxml2 libxml2-devel


2. 缺少:

checking for cURL support... yes
checking for cURL in default path... not found
configure: error: Please reinstall the libcurl distribution -
    easy.h should be in <curl-dir>/include/curl/

yum安装:

# yum -y install curl curl-devel


3. 缺少jpeglib:

If configure fails try --with-webp-dir=<DIR>
configure: error: jpeglib.h not found.

yum安装:

# yum -y install gd gd-devel


4. 缺少mcrypt:

checking for mcrypt support... yes
configure: error: mcrypt.h not found. Please reinstall libmcrypt.

yum安装报错,原因是centos的版权问题:

# yum install libmcrypt libmcrypt-devel


可以使用第三方源:

# wget http://www.atomicorp.com/installers/atomic
# sh ./atomic

然后继续用yum安装:

# yum install php-mcrypt libmcrypt libmcrypt-devel


5. 缺少xslt:

checking for XSL support... yes
configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution

yum安装:

# yum install libxslt-devel


./configure xxxxxxxxxxxxx配置成功后就可以执行

# make && make install

完成安装


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值