The steps of Dart installation on Linux is given below.
Before installing the Dart, if you are Debian/Ubuntu on AMD64(64-bit Intel) in your local machine, you can install the Dart through one of the following options.
- Install using apt-get
- Install a Debian package
Installation using apt-get
Step -1: Type the following commands for a one-time setup.
- $sudo apt-get update
- $ sudo apt-get install apt-transport-https
- $ sudo sh -c ‘wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -‘
- $ sudo sh -c ‘wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list’
Step – 2: Type the following command in terminal to install the Dart SDK using apt-get option.
- $sudo apt-get update
- $ sudo apt-get install dart
It will successfully download the Dart SDK.
Installation a Debian Package
We can download Dart SDK as a Debian package in the .deb package format. To make all Dart binaries accessible, we have to change the PATH by typing the following command.
- export PATH=”$PATH:/usr/lib/dart/bin”
To change the PATH for upcoming terminal sessions, use a below command:
- $ echo ‘export PATH=”$PATH:/usr/lib/dart/bin”‘ >> ~/.profile