macos mojave 安装php5.6

背景介绍

Mac os 1.14 系统以后,若是想安装php5.6版本的时候,没法用brew install php5.6安装,由于在新的brew中已经废弃了php5.6php7.0,若是使用brew search php搜索出来的Php版本最低是php@7.1的,由于公司项目须要安装php5.6的版本,困扰了我好久,终于在google上找到了如何在新版本的系统上安装php5.6的方法,分享给你们。php

系统安装

  1. 添加源

    brew tap exolnet/homebrew-deprecatedshell

  2. 搜索php

    brew search phpphp7

  3. 安装php

    brew install php@5.6ui

  4. 启动

    brew services start php@5.6google

php 扩站安装

  1. memcachecode

    pecl install memcache-3.0.8homebrew

    • 问题总结ci

      1. configure: error: memcache support requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB include and library are locatedit

        • 解决方案class

          不可直接复制,注意上面的crul的版本
          brew install zlib
          
          ln -s /usr/local/Cellar/zlib/1.2.11/include/* /usr/local/include
          
          ln -s /usr/local/Cellar/zlib/1.2.11/lib/* /usr/local/lib
相关文章
相关标签/搜索