LoginSignup
2
3

More than 5 years have passed since last update.

How to Install Yarn in Ubuntu 18.04 LTS?

Posted at

1. 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

2. Install Yarn

$ sudo apt-get update && sudo apt-get install --no-install-recommends yarn

--> Because I used NVM to install NodeJS, I Added "--no-install-recommends".

...
Recommended packages:
  nodejs
The following NEW packages will be installed:
  yarn
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 697 kB of archives.
After this operation, 4,436 kB of additional disk space will be used.
Get:1 https://dl.yarnpkg.com/debian stable/main amd64 yarn all 1.7.0-1 [697 kB]
Fetched 697 kB in 1s (1,105 kB/s)
Selecting previously unselected package yarn.
(Reading database ... 166162 files and directories currently installed.)
Preparing to unpack .../archives/yarn_1.7.0-1_all.deb ...
Unpacking yarn (1.7.0-1) ...
Setting up yarn (1.7.0-1) ...
...

3. Verified Yarn Installtation.

$ yarn -v

1.7.0

2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3