How to Install Node.js on AlmaLinux 9

AlmaLinux 9 provide node.js version 16. Other versions are available in AppStream repository.

To view available node.js versions, run

dnf module list nodejs

example

[root@sokal9 ~]# dnf module list nodejs
Last metadata expiration check: 0:57:10 ago on Sat 22 Mar 2025 04:25:45 PM UTC.
AlmaLinux 9 - AppStream
Name                               Stream                             Profiles                                                             Summary                                      
nodejs                             18                                 common [d], development, minimal, s2i                                Javascript runtime                           
nodejs                             20                                 common [d], development, minimal, s2i                                Javascript runtime                           
nodejs                             22 [e]                             common [d] [i], development, minimal, s2i                            Javascript runtime                           

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
[root@sokal9 ~]# 

To install node.js 22, run

dnf module install nodejs:22/common

If you need to install another version, you need to reset the installed module first

dnf module reset nodejs:22/common

Install another version of node.js

dnf module install nodejs:20/common

See Node.js

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *