MacPro安装composer报错 Error: Failed
2021-02-19 本文已影响0人
i娟儿
在MacPro执行brew install composer后报错如下:
Error: Failed to download resource "composer"
Download failed: https://getcomposer.org/download/2.0.9/composer.phar
报错中资源的地址链接: https://getcomposer.org/download/2.0.9/composer.phar
复制到浏览器直接下载到本地
查看brew的缓存地址,再将composer.phar复制到上面查询到的缓存地址
brew --cache
apple@lu ~ % brew --cache
/Users/lu/Library/Caches/Homebrew
apple@lu ~ % cp Downloads/composer.phar /Users/lu/Library/Caches/Homebrew
apple@lu ~ % ls /Users/lu/Library/Caches/Homebrew
再次执行 brew install composer
---------ps-----------
试过上面的方法后,还是不行,可能是brew下载的版本有问题需要更新git:
brew install git
然后再执行brew install composer