Install Yarn Ubuntu 16.04 (Linux Mint 18.1)

Jose picture Jose · Mar 5, 2017 · Viewed 74.1k times · Source

I have a new installation of Linux Mint 18.1 with Ubuntu 16.04. I have installed Node 6.10.0.

When doing the command that indicates the documentation of Yarn:

sudo apt-get update && sudo apt-get install yarn

It says "could not find yarn package"

I must do something else, because in the documentation I do not see anything about it.

Thank you.

enter image description here

Answer

Shaig Khaligli picture Shaig Khaligli · Mar 5, 2017

On Ubuntu Linux, you can install Yarn via Debian package repository. You will first need to configure the repository:

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list

Then you can simply:

sudo apt-get update && sudo apt-get install yarn

More information here