安裝homebrew
之前brew install php@7.2
就可以愉快的玩耍了,但是昨天突然一直蹦出來錯誤要用brew install --build-from-source
來手動安裝,原因是沒有可用的bottle协饲,這我也忍了御滩,手動裝了N個,結果還老是報error curl(35) server abort the ssl handshake,換了源也不管用厕诡。
解決辦法:應該是安裝的homebrew少了組件累榜,重裝之
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
執(zhí)行命令重新安裝Homebrew,但是報錯
$ /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
curl: (60) SSL certificate problem: self signed certificate in certificate chain
More details here: https://curl.se/docs/sslcerts.html
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
將命令設置成不檢查證書,執(zhí)行成功
/bin/zsh -c "$(curl -k -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
完成后繼續(xù)brew install php@7.2
終于裝完了 感動灵嫌。
brew安裝擴展
繼續(xù)裝一下擴展
通過brew安裝的PHP版本中自帶了pecl,可以直接使用
pecl version 查看版本信息
pecl help 可以查看命令幫助
pecl search xdebug 搜索可以安裝的擴展信息
pecl install xdebug 安裝擴展
pecl install http://pecl.php.net/get/redis-4.2.0.tgz 安裝指定版本擴展
http://www.reibang.com/p/a118f10d738c 參照這篇文章裝的擴展壹罚,裝完我選的第二種方式開啟擴展,重啟php寿羞,一切順利猖凛。