您的位置:首页 > 编程语言 > PHP开发

php7.2安装

2018-03-13 16:13 148 查看
原文: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 foundconfigure: 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.hFix: 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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: