Installing Dart on Mac
Homebrew is a package manager for macOS. With Homebrew, installing and updating Dart is easy.
Don’t want to use homebrew? Another option is downloading Dart manually.
The Dart SDK contains the VM, analyzer, formatter, documentation generator, package manager, and the core libraries.
Install homebrew, and then run:
$ brew tap dart-lang/dart $ brew install dart
If you use Dart for web development work, you should also install Dartium and Content Shell:
$ brew tap dart-lang/dart $ brew install dart --with-content-shell --with-dartium
Installing dev channel releases
To choose the dev channel version of whatever Dart software you install,
$ brew install dart --devel
You can use any combination of the
To update Dart once you’ve installed it using Homebrew, run:
$ brew update $ brew upgrade dart $ brew cleanup dart
Many tools, such as editors, ask you to specify the Dart SDK
installation directory and the location of Dartium.
Homebrew uses the following locations,
where you replace
HOMEBREW_INSTALL with the
the homebrew installation directory
(which you can get using
- SDK directory:
Specifying a custom installation location
By default, Homebrew installs to
If your Mac is set up so that installing to
sudo, we recommend
downloading to another location where you have write permissions, such
as your home directory.
Go to the directory above where you want Homebrew and Dart to live. For example, if you want Homebrew and Dart to live under
~/homebrew, go to
$ cd ~ # The directory that will contain Homebrew and Dart
Clone Homebrew. This creates a
$ git clone https://github.com/Homebrew/homebrew.git
homebrew/bindirectory to your PATH.
brewinstructions in Installing Dart. Dart will be installed under