# 使用 Homebrew, apk, chocolatey, MacPorts, winget, Nix, pacman, apt, scoop 安装 dart-sdk

查看 dart-sdk 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:dart-sdk
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install dart-sdk
```

  证据: local Homebrew formula metadata

- MacPorts (94%):

```sh
sudo port install dart-sdk
```

  证据: MacPorts ports tree: lang/dart-sdk/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1

### Linux

- apk (92%):

```sh
sudo apk add dart-sdk
```

  证据: Alpine Linux edge package indexes: dart-sdk from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz

- Nix (92%):

```sh
nix profile install nixpkgs#dart
```

  证据: nixpkgs package indexes: dart from https://raw.githubusercontent.com/NixOS/nixpkgs/master/pkgs/top-level/all-packages.nix

- pacman (92%):

```sh
sudo pacman -S dart
```

  证据: Arch Linux sync databases: dart from https://geo.mirror.pkgbuild.com/extra/os/x86_64/extra.db.tar.gz

- Debian apt (92%):

```sh
sudo apt install dart-doc
```

  证据: Debian stable package indexes: dart-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

### Windows

- Chocolatey (92%):

```sh
choco install dart-sdk
```

  证据: Chocolatey community package catalog: dart-sdk from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','crystaldiskinfo'

- winget (92%):

```sh
winget install --id Google.DartSDK -e
```

  证据: Windows Package Manager source index: Google.DartSDK from https://cdn.winget.microsoft.com/cache/source.msix

- Scoop (92%):

```sh
scoop install main/dart
```

  证据: Scoop official bucket manifest trees: bucket/dart.json from https://api.github.com/repos/ScoopInstaller/Main/git/trees/master?recursive=1

## 软件包事实

- **软件包键:** brew:dart-sdk
- **软件包管理器:** Homebrew
- **版本:** 3.12.2
- **来源摘要:** Dart Language SDK, including the VM, dart2js, core libraries, and more
- **主页:** <https://dart.dev>
- **仓库:** <https://github.com/dart-lang/sdk>
- **最后更新:** 2026-07-27T21:19:58+02:00
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- dart (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 3.12.2
## 项目历史与用法

The Dart SDK is the main distribution of the Dart programming language: the VM, compilers, core libraries, package tooling, and command-line tools installed as the `dart` command. In package-manager culture it is both a language runtime and the gateway to Dart's build, compile, and package workflows.

### 项目历史

Dart was introduced by Google as a structured language for building client applications, and the SDK became the standard way to obtain the VM, analyzer, compilers, and core command-line tooling. The SDK's role expanded as Dart grew from browser-focused ambitions into the runtime and toolchain behind Flutter and server-side Dart workflows.

The official SDK documentation frames the package as a bundle of libraries and command-line tools, including `dart`, `dart analyze`, `dart compile`, and pub package management. That makes the SDK more than a runtime package: it is the thing downstream packages use to build, test, publish, and execute Dart code.

### 采用历史

Dart SDK adoption is tied closely to Flutter and to Dart's own package ecosystem. As Flutter made Dart a mainstream mobile and cross-platform application language, installing a current SDK became a routine prerequisite for CI systems, editors, and package build environments.

Dart 3 reinforced the SDK's package-manager significance by making sound null safety and modern language behavior the baseline for new tooling. Formula and package updates can therefore affect language compatibility, analyzer behavior, package resolution, and generated artifacts.

### 使用方式

Typical usage starts with the `dart` command: creating projects, running programs, managing dependencies through pub, analyzing code, testing packages, and compiling executables or snapshots. Project configuration normally lives in `pubspec.yaml`, with local overrides in `pubspec_overrides.yaml` and pub authentication tokens stored in the Dart user configuration area.

### 为什么软件包爱好者会关心

The SDK is important to package nerds because it sits at the boundary between runtime, compiler, package manager, and language version. A small SDK version change can alter pub resolution, compiler output, analyzer diagnostics, and compatibility with generated Flutter or server artifacts.

### 时间线

- 2013: Dart 1.0 was announced as a stable SDK release.
- 2023: Dart 3 made sound null safety and newer language semantics the stable baseline.
- Present: The SDK remains the official distribution for Dart command-line tools, compilers, VM, and package workflows.

### Related projects

- The Dart SDK is closely related to Flutter, pub.dev packages, the `pub` package manager built into the `dart` command, and the `dartaotruntime` tool used for running AOT-compiled snapshots.

### 来源

- <https://dart.dev/tools/sdk>
- <https://dart.dev/tools/pub/pubspec>
- <https://dart.dev/tools/pub/cmd/pub-token>
- <https://dart.dev/resources/dart-3-migration>
- <https://news.dartlang.org/2013/11/dart-10-stable-sdk-for-structured-web.html>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## Configuration and credential file locations

These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.


## Configuration files

- Unix: pubspec.yaml, pubspec_overrides.yaml

## Credential files

- Linux: $XDG_CONFIG_HOME/dart/pub-tokens.json, ~/.config/dart/pub-tokens.json
- macOS: ~/Library/Application Support/dart/pub-tokens.json
- Windows: %APPDATA%\dart\pub-tokens.json
## 其他软件包管理器记录

- apk - dart-sdk - 3.10.3-r1: normalized package name match | Alpine Linux edge package indexes: dart-sdk from https://dl-cdn.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz | Dart is a client-optimized language for fast apps on any platform (development files) | https://dart.dev/
- MacPorts - dart-sdk: normalized package name match | MacPorts ports tree: lang/dart-sdk/Portfile from https://api.github.com/repos/macports/macports-ports/git/trees/master?recursive=1
- Chocolatey - dart-sdk: normalized package name match | Chocolatey community package catalog: dart-sdk from http://community.chocolatey.org/api/v2/Packages?$filter=IsLatestVersion&$select=Id&$top=1000&$skiptoken='11','crystaldiskinfo'
- winget - Google.DartSDK: normalized package name match | Windows Package Manager source index: Google.DartSDK from https://cdn.winget.microsoft.com/cache/source.msix
- Debian apt - dart-doc - 6.13.2+ds-3: installed executable or alias match | Debian stable package indexes: dart-doc from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Kinematics Dynamics and Optimization Library - Documentation | https://dartsim.github.io/
- Debian apt - libdart-all-dev - 6.13.2+ds-3+b1: installed executable or alias match | Debian stable package indexes: libdart-all-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Kinematics Dynamics and Optimization Library - All Development Files | https://dartsim.github.io/
- Debian apt - libdart-collision-bullet-dev - 6.13.2+ds-3+b1: installed executable or alias match | Debian stable package indexes: libdart-collision-bullet-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Kinematics Dynamics and Optimization Library - Bullet Collision Dev | https://dartsim.github.io/
- Debian apt - libdart-collision-bullet6.13 - 6.13.2+ds-3+b1: installed executable or alias match | Debian stable package indexes: libdart-collision-bullet6.13 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Kinematics Dynamics and Optimization Library - Bullet Collision Library | https://dartsim.github.io/
- Debian apt - libdart-collision-ode-dev - 6.13.2+ds-3+b1: installed executable or alias match | Debian stable package indexes: libdart-collision-ode-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Kinematics Dynamics and Optimization Library - ODE Collision Dev | https://dartsim.github.io/
- Debian apt - libdart-collision-ode6.13 - 6.13.2+ds-3+b1: installed executable or alias match | Debian stable package indexes: libdart-collision-ode6.13 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Kinematics Dynamics and Optimization Library - ODE Collision Library | https://dartsim.github.io/
- Debian apt - libdart-dev - 6.13.2+ds-3+b1: installed executable or alias match | Debian stable package indexes: libdart-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Kinematics Dynamics and Optimization Library - development files | https://dartsim.github.io/
- Debian apt - libdart-external-convhull-3d-dev - 6.13.2+ds-3+b1: installed executable or alias match | Debian stable package indexes: libdart-external-convhull-3d-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Kinematics Dynamics and Optimization Library - convhull-3d dev | https://dartsim.github.io/
- Debian apt - libdart-external-ikfast-dev - 6.13.2+ds-3+b1: installed executable or alias match | Debian stable package indexes: libdart-external-ikfast-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Kinematics Dynamics and Optimization Library - ikfast dev | https://dartsim.github.io/
- Debian apt - libdart-external-imgui-dev - 6.13.2+ds-3+b1: installed executable or alias match | Debian stable package indexes: libdart-external-imgui-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Kinematics Dynamics and Optimization Library - imgui dev | https://dartsim.github.io/
- Debian apt - libdart-external-imgui6.13 - 6.13.2+ds-3+b1: installed executable or alias match | Debian stable package indexes: libdart-external-imgui6.13 from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Kinematics Dynamics and Optimization Library - imgui lib | https://dartsim.github.io/
- Debian apt - libdart-external-lodepng-dev - 6.13.2+ds-3+b1: installed executable or alias match | Debian stable package indexes: libdart-external-lodepng-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | Kinematics Dynamics and Optimization Library - lodepng dev | https://dartsim.github.io/


## Combined YAML source

View the package source record on GitHub. [combined/dart-sdk.yml](https://github.com/mxcl/pkgdb/blob/main/combined/dart-sdk.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated configuration and credential file locations
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
