錯誤代碼: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 參數(shù))
$ 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