I've installed Dart according to instructions from the official website (https://www.dartlang.org/tools/debian.html). To be more exactly:
$ 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
$ sudo apt-get install dart
Installation was successful, but some time later I found that there is no other related commands like pub, dart2js.
pub: command not found
dart2js: command not found
What's wrong?
OS: Ubuntu 14.10
I know nothing about Dart, yet I downloaded the deb and looked inside it. The files you're looking for are located at
/usr/lib/dart/bin/
. You're getting "command not found" because that directory is not in$PATH
.You should be able to run them by providing the full path:
Or you may want to add
/usr/lib/dart/bin
to $PATH.Another way to fix it using symlinks
I know it's a bit late , but I am putting this for future reference As @Eric mentioned , dart directory needs to be added to your PATH .
These steps can be followed to add /usr/lib/dart/bin to your PATH on ubuntu:
Then add this line to your .profile file :
Then you need to reload your .profile file :