错误代码: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
网友评论