HomeBrew 安装 yarn 1.6.0 版本失败

错误代码:curl: (56) LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54

==> Downloading https://yarnpkg.com/downloads/1.6.0/yarn-v1.6.0.tar.gz
==> Downloading from https://github.com/yarnpkg/yarn/releases/download/v1.6.0/yarn-v1.6.0.tar.gz
###########################                                               38.6%
curl: (56) LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
######################################################################## 100.0%
curl: (7) Failed to connect to github-production-release-asset-2e65be.s3.amazonaws.com port 443: Operation timed out
Error: Failed to download resource "yarn"
Download failed: https://yarnpkg.com/downloads/1.6.0/yarn-v1.6.0.tar.gz

原因应该是 curl 有问题,将 homebrew 源切换成中科院的源也无法解决问题!

最后找到一种方式解决了,在 Mac 终端输入如下命令:

$ git config --global core.compression -1

然后重新安装 yarn(由于电脑安装了 node,所以带上 --without-node 参数)

$ brew install yarn --without-node
==> Downloading https://yarnpkg.com/downloads/1.6.0/yarn-v1.6.0.tar.gz
==> Downloading from https://github.com/yarnpkg/yarn/releases/download/v1.6.0/yarn-v1.6.0.tar.gz
######################################################################## 100.0%
🍺  /usr/local/Cellar/yarn/1.6.0: 14 files, 4.1MB, built in 4 minutes 58 seconds
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容