我想安装dart环境,所以:
brew tap dart-lang/dart
brew install dart
然后报错:
==> Installing dart from dart-lang/dart
==> Downloading https://storage.googleapis.com/dart-archive/channels/stable/rele
#=#=#
curl: (35) error:1400410B:SSL routines:CONNECT_CR_SRVR_HELLO:wrong version number
Error: Failed to download resource "dart"
Download failed: https://storage.googleapis.com/dart-archive/channels/stable/release/2.8.4/sdk/dartsdk-macos-x64-release.zip
google后的解决办法,将需要下载的“https://storage.googleapis.com/dart-archive/channels/stable/release/2.8.4/sdk/dartsdk-macos-x64-release.zip”手动下载,放到homebrew的缓存路径,尝试后也不行。
解决办法
在brew install dart
后加-v
chenxin@JUGGCHEN-MB0 Applications % brew install dart -v
==> Installing dart from dart-lang/dart
==> Downloading https://storage.googleapis.com/dart-archive/channels/stable/release/2.8.4/sdk/dartsdk-macos-x64-release.zip
/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/2.4.3\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 10.15.3\)\ curl/7.64.1 --fail --retry 3 --location --remote-time --continue-at 0 --output /Users/chenxin/Library/Caches/Homebrew/downloads/cc890b64dedeca4d34ac8849fc5d9aedd2398d0bcd4b4c5b3aeee911fa8c9656--dartsdk-macos-x64-release.zip.incomplete https://storage.googleapis.com/dart-archive/channels/stable/release/2.8.4/sdk/dartsdk-macos-x64-release.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0curl: (35) error:1400410B:SSL routines:CONNECT_CR_SRVR_HELLO:wrong version number
Error: Failed to download resource "dart"
Download failed: https://storage.googleapis.com/dart-archive/channels/stable/release/2.8.4/sdk/dartsdk-macos-x64-release.zip
会看到--output /Users/chenxin/Library/Caches/Homebrew/downloads/cc890b64dedeca4d34ac8849fc5d9aedd2398d0bcd4b4c5b3aeee911fa8c9656--dartsdk-macos-x64-release.zip.incomplete
,然后把刚刚下载的文件放到这个文件夹下,并且改成这个名字cc890b64dedeca4d34ac8849fc5d9aedd2398d0bcd4b4c5b3aeee911fa8c9656--dartsdk-macos-x64-release.zip.incomplete
(注意:你的电脑上不是这个名字,也不是这个路径),再执行brew install dart
就成功了。