Mac安装composer爬过的坑
Posted 妖星杉木博客
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Mac安装composer爬过的坑相关的知识,希望对你有一定的参考价值。
1.首先安装brew
/usr/bin/ruby -e "$(curl -fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install)"
2.安装composer
brew install composer
安装的composer可能还不是最新版本的,可以升级一下
composer self-update
可能会报错。代码为:
Error: No available formula with the name "php56-redis" ==> Searching for a previously deleted formula... Error: No previously deleted formula found. ==> Searching for similarly named formulae... Error: No similarly named formulae found. ==> Searching taps... Error: No formulae found in taps.
3.在brew中添加tap
brew tap homebrew/homebrew-php
4.php56-redis 扩展
brew install php56-redis
就能安装成功了,此过程需要一些时间,大概十分钟左右
5.不要忘了重启apache
sudo apachectl restart
6.安装composer
brew install composer
截图:
7.验证composer
以上是关于Mac安装composer爬过的坑的主要内容,如果未能解决你的问题,请参考以下文章