您的位置:首页 > 运维架构 > Linux

centos7下安装php7

2016-06-11 15:07 507 查看
大致的过程参考了这篇文章:点击打开链接

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

在执行./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

完成安装
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: