• Categories
    Category
  • Categories
    Category
  • News
  • Tutorials
  • Forums
  • Tags
  • Users
Tutorial Comments FAQ Related Articles

How to install Yarn Package Manager on Rocky Linux 9.2

  • 00:30 Cat /etc/os-release
  • 00:47 curl -sL https://rpm.nodesource.com/setup_16.x | bash -
  • 01:05 dnf install nodejs
  • 01:44 node -v
  • 01:55 npm -v
  • 02:12 curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
  • 02:23 sudo rpm --import https://dl.yarnpkg.com/rpm/pubkey.gpg
  • 02:23 sudo rpm --import https://dl.yarnpkg.com/rpm/pubkey.gpg
  • 02:23 sudo rpm --import https://dl.yarnpkg.com/rpm/pubkey.gpg
  • 02:32 dnf install yarn
  • 02:53 yarn -v
7715

To Install Yarn Package Manager On Rocky Linux 9.2

Introduction:

YARN, short for Yet Another Resource Navigator, is a fast, stable, and reliable Javascript package manager that is compatible with npm ( Node Package Manager). Yarn helps with the management of npm packages which includes installation, updating, configuration, and removal of packages.

Installation Steps:

Step 1: Check the version of the OS by using the below command

[root@Linuxhelp ~]# cat /etc/os-release
NAME="Rocky Linux"
VERSION="9.2 (Blue Onyx)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.2"
PLATFORM_ID="platform:el9"
PRETTY_NAME="Rocky Linux 9.2 (Blue Onyx)"
ANSI_COLOR="0;32"
LOGO="fedora-logo-icon"
CPE_NAME="cpe:/o:rocky:rocky:9::baseos"
HOME_URL="https://rockylinux.org/"
BUG_REPORT_URL="https://bugs.rockylinux.org/"
SUPPORT_END="2032-05-31"
ROCKY_SUPPORT_PRODUCT="Rocky-Linux-9"
ROCKY_SUPPORT_PRODUCT_VERSION="9.2"
REDHAT_SUPPORT_PRODUCT="Rocky Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="9.2"

Step 2: Add the NodeSource repository by using the below command.

[root@Linuxhelp ~]# curl -sL https://rpm.nodesource.com/setup_16.x | bash -

================================================================================
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
================================================================================

                          SCRIPT DEPRECATION WARNING                    
 The NodeSource Node.js Linux distributions GitHub repository contains
 information about which versions of Node.js and which Linux distributions
 are supported and how to install it.
 https://github.com/nodesource/distributions

                         SCRIPT DEPRECATION WARNING

TO AVOID THIS WAIT MIGRATE THE SCRIPT
Continuing in 60 seconds (press Ctrl-C to abort) ...


## Installing the NodeSource Node.js 16.x repo...


## Inspecting system...

+ uname -m
rocky-release-9.2-1.6.el9.noarch
exec redhat-release
Release package: rocky-release-9.2-1.6.el9.noarch

## Confirming "el9-x86_64" is supported...

+ curl -sLf -o /dev/null 'https://rpm.nodesource.com/pub_16.x/el/9/x86_64/nodesource-release-el9-1.noarch.rpm'

## Downloading release setup RPM...

+ mktemp
+ curl -sL -o '/tmp/tmp.jCLolm22K2' 'https://rpm.nodesource.com/pub_16.x/el/9/x86_64/nodesource-release-el9-1.noarch.rpm'

## Installing release setup RPM...

+ rpm -i --nosignature --force '/tmp/tmp.jCLolm22K2'

## Cleaning up...

+ rm -f '/tmp/tmp.jCLolm22K2'

## Checking for existing installations...

+ rpm -qa 'node|npm' | grep -v nodesource

## Run `sudo yum install -y nodejs` to install Node.js 16.x and npm.
## You may run dnf if yum is not available:
    sudo dnf install -y nodejs
## You may also need development tools to build native addons:
    sudo yum install gcc-c++ make
## To install the Yarn package manager, run:
    curl -sL https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
    sudo yum install yarn

Step 3: Next, install the latest Node.js version by using the below command

[root@Linuxhelp ~]# dnf install nodejs
Node.js Packages for Enterprise Linux 9 - x86_64                                   452 kB/s | 280 kB     00:00    
Rocky Linux 9 - BaseOS                                                             4.4 kB/s | 4.1 kB     00:00    
Rocky Linux 9 - AppStream                                                          4.8 kB/s | 4.5 kB     00:00    
Rocky Linux 9 - Extras                                                             3.9 kB/s | 2.9 kB     00:00    
Dependencies resolved.
===================================================================================================================
Package               Architecture          Version                               Repository                 Size
===================================================================================================================
Installing:
nodejs                x86_64                2:16.20.2-1nodesource                 nodesource                 32 M

Transaction Summary
===================================================================================================================
Install  1 Package

Total download size: 32 M
Installed size: 89 M
Is this ok [y/N]: y
Downloading Packages:
nodejs-16.20.2-1nodesource.x86_64.rpm                                               20 MB/s |  32 MB     00:01    
-------------------------------------------------------------------------------------------------------------------
Total                                                                               20 MB/s |  32 MB     00:01     
Node.js Packages for Enterprise Linux 9 - x86_64                                   1.6 MB/s | 1.6 kB     00:00    
Importing GPG key 0x34FA74DD:
Userid     : "NodeSource <gpg-rpm@nodesource.com>"
Fingerprint: 2E55 207A 95D9 944B 0CC9 3261 5DDB E8D4 34FA 74DD
From       : /etc/pki/rpm-gpg/NODESOURCE-GPG-SIGNING-KEY-EL
Is this ok [y/N]: y
Key imported successfully
Transaction test succeeded.
Running transaction
 Preparing        :                                                                                           1/1 
 Running scriptlet: nodejs-2:16.20.2-1nodesource.x86_64                                                       1/1 
 Installing       : nodejs-2:16.20.2-1nodesource.x86_64                                                       1/1 
 Running scriptlet: nodejs-2:16.20.2-1nodesource.x86_64                                                       1/1 
 Verifying        : nodejs-2:16.20.2-1nodesource.x86_64                                                       1/1 

Installed:
 nodejs-2:16.20.2-1nodesource.x86_64                                                                              

Complete!

Step 4: Verify the installed Node.js version by using the below command

[root@Linuxhelp ~]# node -v
v16.20.2

Step 5: To verify the NPM version, by using the below command

[root@Linuxhelp ~]# npm -v
8.19.4

Step 6: By default, Yarn is not available on Rocky Linux 9 base repository. Now run the below command to add the Yarn repository to your system.

[root@Linuxhelp ~]# curl --silent --location https://dl.yarnpkg.com/rpm/yarn.repo | sudo tee /etc/yum.repos.d/yarn.repo
[yarn]
name=Yarn Repository
baseurl=https://dl.yarnpkg.com/rpm/
enabled=1
gpgcheck=1
gpgkey=https://dl.yarnpkg.com/rpm/pubkey.gpg
[root@Linuxhelp ~]# rpm --import https://dl.yarnpkg.com/rpm/pubkey.gpg

Step 7: After the repository has been successfully added, we can install Yarn by using the below command

[root@Linuxhelp ~]# dnf install yarn
Yarn Repository                                                                    436 kB/s | 316 kB     00:00    
Dependencies resolved.
===================================================================================================================
 Package                  Architecture               Version                        Repository                Size
===================================================================================================================
Installing:
 yarn                     noarch                     1.22.19-1                      yarn                     1.2 M

Transaction Summary
===================================================================================================================
Install  1 Package

Total download size: 1.2 M
Installed size: 5.1 M
Is this ok [y/N]: y
Downloading Packages:
yarn-1.22.19-1.noarch.rpm                                                          1.9 MB/s | 1.2 MB     00:00    
-------------------------------------------------------------------------------------------------------------------
Total                                                                              1.9 MB/s | 1.2 MB     00:00     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                                           1/1 
  Installing       : yarn-1.22.19-1.noarch                                                                     1/1 
  Verifying        : yarn-1.22.19-1.noarch                                                                     1/1 
Installed:
  yarn-1.22.19-1.noarch                                                                                            
Complete!

Step 8: Now we can check the Yarn version by using the below command

[root@Linuxhelp ~]# yarn -v
1.22.19

Conclusion:

We have reached the end of this article. In this guide, we have walked you through the steps required to install Yarn Package Manager on Rocky Linux Debian 9.2. Your feedback is much welcome.

Tags:
michael
Author: 

Comments ( 0 )

No comments available

Add a comment

Frequently asked questions ( 5 )

Q

What is Yarn Package Manager?

A

Yarn is a JavaScript package manager that serves as an alternative to npm (Node Package Manager). It was developed by Facebook, Google, Exponent, and Tilde. Yarn is designed to be fast, reliable, and secure when installing and managing JavaScript packages.

Q

How do I check if Yarn is installed?

A

After installing Yarn, you can check the version to confirm the installation. Open a terminal and run:
yarn –version

Q

How do I use Yarn to install packages?

A

Once you have installed Yarn, you can use it to install packages by running the following command:
yarn add

Q

How do I create a new project with Yarn?

A

To create a new project, navigate to the desired directory in your terminal and run:
yarn init

Q

How do I remove a package with Yarn?

A

To remove a package from your project, you can run the following command:
yarn remove

Related Tutorials in How to install Yarn Package Manager on Rocky Linux 9.2

Related Tutorials in How to install Yarn Package Manager on Rocky Linux 9.2

How to install Xrdp Server (Remote Desktop) on Oracle Linux 8.5
How to install Xrdp Server (Remote Desktop) on Oracle Linux 8.5
Oct 17, 2022
How to install and update OpenSSL on Debian 11.3
How to install and update OpenSSL on Debian 11.3
Oct 21, 2022
How to Install and Configure Mega in Linux
How to Install and Configure Mega in Linux
Jul 19, 2016
How to use Aureport command on Linux
How to use Aureport command on Linux
Nov 28, 2017
How to install Development tools on Linux
How to install Development tools on Linux
Jun 12, 2018
How to Install mod_ssl and SSL certificate on Oracle Linux
How to Install mod_ssl and SSL certificate on Oracle Linux
Dec 30, 2021
How to install Nextcloud on Ubuntu 22.04 version
How to install Nextcloud on Ubuntu 22.04 version
Jun 23, 2023
How to install ClipGrab in Linux
How to install ClipGrab in Linux
Jul 16, 2016

Related Forums in How to install Yarn Package Manager on Rocky Linux 9.2

Related Forums in How to install Yarn Package Manager on Rocky Linux 9.2

Linux
jayce class=
shasum command not found
May 5, 2017
Linux
stephan class=
How to list all samba users
Jan 12, 2018
pv command
muhammad class=
pvcreate command not found error
May 9, 2017
Linux
henry class=
Starting NFS daemon: rpc.nfsd: writing fd to kernel failed: errno 111 (Connection refused)
Apr 25, 2017
ifconfig command
jackbrookes class=
what is the location of the ifconfig program on your machine?
Jan 4, 2018
Linux
baseer class=
single command to apply setfacl for multiple user at a time
Jan 23, 2018
Linux
beulah class=
What does mean by 0 0 value in fstab file
Jan 2, 2018
CentOS
mason class=
Error getting authority: Error initializing authority: Could not connect: No such file or directory (g-io-error-quark, 1)
Nov 20, 2018

Related News in How to install Yarn Package Manager on Rocky Linux 9.2

Related News in How to install Yarn Package Manager on Rocky Linux 9.2

Anbox, the Android-to-Linux tool the developers have been waiting for
Anbox, the Android-to-Linux tool the developers have been waiting for
Apr 17, 2017
Linus Torvalds stops signing Linux kernel RC tarballs
Linus Torvalds stops signing Linux kernel RC tarballs
May 17, 2017
Capsule8 Launches Linux-Based Container Security Platform
Capsule8 Launches Linux-Based Container Security Platform
Feb 14, 2017
Symantec updates Management console product
Symantec updates Management console product
Nov 22, 2017
Latest Linux driver release feature seven AMD Vega
Latest Linux driver release feature seven AMD Vega
Mar 23, 2017
A Newer and a Faster Window Manager for Tina (Linux Mint 19.2)
A Newer and a Faster Window Manager for Tina (Linux Mint 19.2)
Apr 9, 2019
Microsoft makes its Azure App service now available on Linux Systems
Microsoft makes its Azure App service now available on Linux Systems
Sep 7, 2017
Docker friendly Alpine Linux gets hardened Node.js
Docker friendly Alpine Linux gets hardened Node.js
Apr 19, 2017
Back To Top!
Rank
User
Points

Top Contributers

userNamenaveelansari
135850

Top Contributers

userNameayanbhatti
92510

Top Contributers

userNamehamzaahmed
32150

Top Contributers

1
userNamelinuxhelp
31040

Top Contributers

userNamemuhammadali
24500
Can you help Owen ?
How to add SSH key to my Gitlab account

I need to add the SSH key in my gitlab account. How to do so ????

Networking
  • Routing
  • trunk
  • Netmask
  • Packet Capture
  • domain
  • HTTP Proxy
Server Setup
  • NFS
  • KVM
  • Memory
  • Sendmail
  • WebDAV
  • LXC
Shell Commands
  • Cloud commander
  • Command line archive tools
  • last command
  • Shell
  • terminal
  • Throttle
Desktop Application
  • Linux app
  • Pithos
  • Retrospect
  • Scribe
  • TortoiseHg
  • 4Images
Monitoring Tool
  • Monit
  • Apache Server Monitoring
  • EtherApe 
  • Arpwatch Tool
  • Auditd
  • Barman
Web Application
  • Nutch
  • Amazon VPC
  • FarmWarDeployer
  • Rukovoditel
  • Mirror site
  • Chef
Contact Us | Terms of Use| Privacy Policy| Disclaimer
© 2025 LinuxHelp.com All rights reserved. Linux™ is the registered trademark of Linus Torvalds. This site is not affiliated with linus torvalds in any way.