If you’re using Debian/Ubuntu, you can choose two options, both of which can update the SDK automatically when new versions are released.
Other options are:
To install the Dart SDK with apt-get, you first need to do some setup.
The following one-time commands set up the install for the stable channel.
# Enable HTTPS for apt. $ sudo apt-get update $ sudo apt-get install apt-transport-https # Get the Google Linux package signing key. $ sudo sh -c 'curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -' # Set up the location of the stable repository. $ sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list' $ sudo apt-get update
The following one-time command sets up the install for the dev channel. Do this in addition to the set up for stable channel.
# Before running this command, follow the instructions in # "Set up for the stable channel". $ sudo sh -c 'curl https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_unstable.list > /etc/apt/sources.list.d/dart_unstable.list'
The following command installs the highest available version of the Dart SDK, based on your setup.
$ sudo apt-get install dart
If you have set up your environment for both the stable and dev channel releases, the previous command always installs the dev channel, as that has a higher version number. If you want to install the stable channel instead of the dev channel, or to install a specific version number, see the next section.
The dev channel has a higher version number than the stable channel. To force installation of the stable version, use the following command.
$ sudo apt-get install dart/stable
To install a particular release, specify the version. For example:
$ sudo apt-get install dart=1.5.8-1 $ sudo apt-get install dart=1.6.* $ sudo apt-get install dart=1.7.0-dev.0.1.*
Use one of the following buttons to download the stable or
dev channel release in the .deb
package format.
You can manually download and extract the Dart SDK from a zip file:
If you’re creating Dart web apps, also download Dartium:
The Dartium binary expires after 1 year. When that happens, you need to download a new copy to continue using Dartium.
You can build the SDK yourself. If your system uses an older version of Ubuntu, you might need to update to GCC 4.6 or later. See the Tools FAQ for more information.