php7.2安装

原文:https://www.cnblogs.com/lostk/p/6225055.html

1. wget http://hk1.php.net/get/php-7.2.3.tar.gz/from/this/mirror

2. tar -xzvf php-7.2.3.tar.gz

3. cd php-7.2.3.tar.gz

./configure  --prefix=/usr/local/php71  --with-pdo-pgsql  --with-zlib-dir  --with-freetype-dir  --enable-mbstring  --with-libxml-dir=/usr  --enable-soap  --enable-calendar  --with-curl  --with-mcrypt  --with-gd  --with-pgsql  --disable-rpath  --enable-inline-optimization  --with-bz2  --with-zlib  --enable-sockets  --enable-sysvsem  --enable-sysvshm  --enable-pcntl  --enable-mbregex  --enable-exif  --enable-bcmath  --with-mhash  --enable-zip  --with-pcre-regex  --with-pdo-mysql  --with-mysqli  --with-jpeg-dir=/usr  --with-png-dir=/usr  --enable-gd-native-ttf  --with-openssl  --with-fpm-user=www-data  --with-fpm-group=www-data  --with-libdir=/lib/x86_64-linux-gnu/  --enable-ftp  --with-gettext  --with-xmlrpc  --with-xsl  --enable-opcache  --enable-fpm  --with-iconv  --with-xpm-dir=/usr

安装各种依赖库

出现报错 Cannot find OpenSSL's <evp.h>
则执行 yum install openssl openssl-devel
 
出现报错 Please reinstall the libcurl distribution
则执行 yum -y install curl-devel
 
出现报错 jpeglib.h not found
则执行 yum install libjpeg.x86_64 libpng.x86_64 freetype.x86_64 libjpeg-devel.x86_64 libpng-devel.x86_64 freetype-devel.x86_64 -y
和执行yum install libjpeg-devel
 
 
checking for BZip2 in default path... not found
configure: error: Please reinstall the BZip2 distribution
这是bzip2软件包没有安装
解决办法
yum install bzip2-devel.x86_64 -y
 
 
configure: error: xpm.h not found.
yum install libXpm-devel
 
error: Unable to locate gmp.h
Fix: yum install gmp-devel
 
现象:Unable to detect ICU prefix or /usr//bin/icu-config failed. Please verify ICU install
 prefix and make sure icu-config works
解决办法:yum install -y icu libicu libicu-devel
 
错误:mcrypt.h not found. Please reinstall libmcrypt.
解决办法:yum  install  php-mcrypt  libmcrypt  libmcrypt-devel
 
错误: configure: error: Cannot find libpq-fe.h. Please specify correct PostgreSQL installation path
解决办法:yum install  postgresql-devel
 
错误 : configure: error: xslt-config not found. Please reinstall the libxslt >= 1.1.0 distribution
解决: yum install libxslt-devel


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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值