To install Yarn on AlmaLinux 9, you can use either NPM or DNF. Below are the step-by-step instructions for both methods.
Install Yarn Using NPM
Step 1 : Check Node.js and NPM Version
Before installing Yarn, ensure that Node.js and NPM are installed. Run the following command:
Step 2 : Install Yarn via NPM
Once NPM is available, install Yarn globally using:
Step 3 : Verify Yarn Installation
Check if Yarn was installed successfully by running:
Install Yarn Using DNF
Step 4 : Update System Packages
Ensure your system is up to date before installing Yarn:
Step 5 : Add Yarn Repository
Run the following command to add the official Yarn repository:
Step 6 : Search for Yarn Package
Check if Yarn is available in the repository:
Step 7 : Install Yarn
Install Yarn using DNF:
Step 8 : Verify Yarn Installation
Confirm that Yarn has been installed successfully by checking its version:
Congratulations! You have successfully installed Yarn on AlmaLinux 9.