美文网首页
MacPro安装composer报错 Error: Failed

MacPro安装composer报错 Error: Failed

作者: i娟儿 | 来源:发表于2021-02-19 14:31 被阅读0次

在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

相关文章

网友评论

      本文标题:MacPro安装composer报错 Error: Failed

      本文链接:https://www.haomeiwen.com/subject/jhjaxltx.html