Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Dart - getting start - missing step - how to install pub

I'm trying to get started and setup to develop Dart. I'm following the instructions on https://webdev.dartlang.org/guides/get-started to install on Linux. However there seems to be an essential step missing.

On the above link, step 2 is about installing the SDK. Step 3 is titled:

Get CLI tools or WebStorm (or both)

However step gives examples of using the pub command, and the links it references also use this command, however there are no instructions on where to find the pub utility or how to install it.

I would have assumed that pub was provided as part of the Dart SDK. I can run dart in my terminal, and see that it is installed. For example dart --version returns Dart VM version: 2.0.0 (Unknown timestamp) on "linux_x64". But pub returns zsh: command not found: pub

My question, therefore, is where do I find, and how do I install pub?

like image 471
Magick Avatar asked Oct 17 '22 13:10

Magick


1 Answers

You need to add thedart-sdk/bin directory to the system PATH variable.

like image 137
Günter Zöchbauer Avatar answered Oct 21 '22 00:10

Günter Zöchbauer