博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
MAC下尝试PHP7 alpha版本的安装
阅读量:7168 次
发布时间:2019-06-29

本文共 1734 字,大约阅读时间需要 5 分钟。

经过鸟哥等众位大神打磨了2年的PHP 7,终于出了发布了alpha版本,安装,真是非常地向下兼容,下载,解压,把之前的配置命令用上,一路回车下去,毫无违和感。

  1. 首先当然是下载php7 alpha版本的源码包了,去php的官网 下载即可,为了方便起见,附上下载链接。

  2. 解压下载源码包,然后如下操作【这里以我的安装为例,其他的类似】

tar -zxvf php-7.0.0alpha1.tar.gzcd php-7.0.0alpha1./buildconf./configure --prefix=/usr/local/php7 --enable-fpm --with-fpm-user=www --with-fpm-group=www --with-mysqli --with-pdo-mysql --with-iconv-dir --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex --enable-mbstring --with-mcrypt --enable-ftp --with-gd --enable-gd-native-ttf --with-openssl --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-zip --enable-soap --without-pear --with-gettext --disable-fileinfo --enable-maintainer-ztsmakesudo make install#最后来测试一把/usr/local/php7/bin/php -vPHP 7.0.0alpha1 (cli) (built: Jun 14 2015 18:24:50) Copyright (c) 1997-2015 The PHP GroupZend Engine v3.0.0-dev, Copyright (c) 1998-2015 Zend Technologies

上面的过程如果顺利的话。php7就安装成功了,如果有错误的话那还是得解决一下,这里就列出了几个我在安装过程中遇到的一些错误:

  • 错误1

    configure: error: jpeglib.h not found.

    解决办法:

    sudo brew install libjpeg
  • 错误2

    configure: error: png.h not found.

    解决办法:

    sudo brew install libpng   #这里我使用brew安装libpng的适合老是提示download失败,于是干脆使用源码安装了,如下:   tar -zxvf libpng-1.6.16.tar.gz   cd libpng-1.6.16   ./configure   make   sudo make install

    libpng下载地址:

  • 错误3

    configure: error: Cannot locate header file libintl.h

    解决办法:

    #安装 gettext   sudo brew install gettext   #编辑 configure 文件,找到 $PHP_GETTEXT /usr/local /usr 在后面加上gettext的路径 $PHP_GETTEXT /usr/local /usr /usr/local/opt/gettext   sudo vim configure   #重新配置即可【后面参数和上面一样,这里省略了】   ./configure --prefix=...

    好了,我的就这么多了,大家赶快去试试吧。。。

转载地址:http://blqwm.baihongyu.com/

你可能感兴趣的文章
教你如何实现 Android TextView 文字轮播效果
查看>>
UITableView
查看>>
ContextMenu和OptionsMenu主要有以下区别
查看>>
iptables详解
查看>>
Mysql 分区介绍(九) —— 分区管理
查看>>
exchange2010---将邮箱置于保留挂起中---Retention Hold
查看>>
Vert.x系列(四)-- HAManager源码分析
查看>>
Java 8 中的 Streams API 详解
查看>>
搭建安全的Web服务器
查看>>
初学者
查看>>
小叙安装CentOS 6.5
查看>>
LVM 扩展/减缩/镜像 【有图有真相】
查看>>
Live Migrate 操作 - 每天5分钟玩转 OpenStack(42)
查看>>
我的友情链接
查看>>
免费为网站加上HTTPS
查看>>
银河麒麟操作系统上配置Bond(二)使用ifenslave方式
查看>>
Python高阶函数
查看>>
Xen虚拟化
查看>>
spring 数据连接池
查看>>
免软驱 安装 windows server 2003 RAID驱动 -GenerateDriverDiskISO
查看>>