macos mojave 安裝php5.6

背景介紹

Mac os 1.14 系統之後,如果想安裝php5.6版本的時候,無法用brew install php5.6安裝,因爲在新的brew中已經廢棄了php5.6php7.0,如果使用brew search php搜索出來的Php版本最低是[email protected]的,因爲公司項目需要安裝php5.6的版本,困擾了我很久,終於在google上找到了如何在新版本的系統上安裝php5.6的方法,分享給大家。

系統安裝

  1. 添加源

    brew tap exolnet/homebrew-deprecated

  2. 搜索php

    brew search php

  3. 安裝php

    brew install [email protected]

  4. 啓動

    brew services start [email protected]

php 擴站安裝

  1. memcache

    pecl install memcache-3.0.8

    • 問題總結

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

        • 解決方案

          不可直接複製,注意上面的crul的版本
          brew install curl
          
          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
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章