Dart SDK
1.1、Dart SDK简介

Dart SDK是使用Dart语言进行开发Web App命令行App的工具。

如果您想用Dart语言开发移动App,请使用Flutter SDK

1.2、通过包管理器安装Dart SDK
操作系统包管理器安装命令
Windowsscoopscoop install dart
WindowsChocolateychoco install -y dart-sdk
macOSHomeBrewbrew tap dart-lang/dart
brew install dart
GNU/LinuxHomeBrewbrew tap dart-lang/dart
brew install dart
aptsudo apt-get update
sudo apt-get install apt-transport-https
sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
CentOSyum
dnf
Alpine Linuxapk

Arch Linux

ArcoLinux

Manjaro Linux

pacmansudo pacman -Syyu --noconfirm
sudo pacman -S    --noconfirm dart
1.3、通过下载预编译好的二进制压缩包安装Dart SDK

step1、安装依赖

所有时Terminal + Shell
下载时cURL
解压时unzip
运行时
  • glibc ( libc.solibm.solibdl.solibpthread.sold-linux-x86-64.so )
  • GCC ( libstdc++.solibgcc_s.so )

step2、使用curl命令下载编译好的二进制压缩包 (

curl -LO https://storage.googleapis.com/dart-archive/channels/stable/release/2.1.0/sdk/dartsdk-linux-x64-release.zip

step3、使用unzip解压下载好的二进制压缩包

unzip dartsdk-linux-x64-release.zip

step4、配置PATH环境变量

export PATH=$PATH:~/dart-sdk/bin
1.4、Dart SDK中包含的工具