brew 安装dart
利用brew 安装dart时用以下两个命令:
$ brew tap dart-lang/dart
$ brew install dart
第二个命令报以下错误,大概意思是在官网下载SDK时失败。
brew install dart
==> Installing dart from dart-lang/dart
==> Downloading https://storage.googleapis.com/dart-archive/channels/stable/release
-=O=- # # # #
curl: (35) LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to storage.googleapis.com:443
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``
解决方法
思路:利用其它方法下载安装包,放到brew的包缓存目录然后在利用 $ brew install dart 命令安装
1、利用迅雷,或者浏览器下载安装包,地址就是错误日志里的链接 https://storage.googleapis.com/dart-archive/channels/stable/release/2.8.4/sdk/dartsdk-macos-x64-release.zip
2、下载好把zip文件拷贝到 **/Users/wjw/Library/Caches/Homebrew/downloads ** 目录下
3、执行安装命令,Xcode 需要11.5+
brew install dart
Updating Homebrew...
==> Installing dart from dart-lang/dart
==> Downloading https://storage.googleapis.com/dart-archive/channels/stable/release
######################################################################## 100.0%
Warning: Your Xcode (11.3) is outdated.
Please update to Xcode 11.5 (or delete it).
Xcode can be updated from the App Store.
==> Caveats
Please note the path to the Dart SDK:
/usr/local/opt/dart/libexec
==> Summary
???? /usr/local/Cellar/dart/2.8.4: 502 files, 486MB, built in 10 seconds
这样就安装好了
$ dart --version
Dart VM version: 2.8.4 (stable) (Wed Jun 3 12:26:04 2020 +0200) on "macos_x64"
|
请发表评论