Node.js is a powerful open source JavaScript runtime built on Chrome’s V8 JavaScript engine for building fast and scalable network applications. Node.js 18 is available for Testers and guys who like working with the current latest releases of Node.js. This guide will cover how you can install Node.js 18 on CentOS 7 / Fedora 39/38/37/36/35/34/33 Linux systems

Install Node.js 18 on CentOS 7 / Fedora
We’ll install Node.js 18 on CentOS 7 / Fedora from the NodeSource Node.js Binary Distributions.
Option 1) Install Node.js 18 Using Snap
Install Snap using the guide in the following article:
For Fedora Linux install Snapd using the following commands:
sudo dnf install snapd fuse squashfuse kernel-modules -y
sudo ln -s /var/lib/snapd/snap /snap
sudo reboot
Then use snap
command to install Node.js 18 on CentOS 7
$ sudo snap install node --classic --channel=18
node (18/stable) 18.18.0 from OpenJS Foundation (iojs✓) installed
Validate installation:
$ node -v
v18.18.0
Option 2) Install Node.js 18 from RPM
Just run the command below to setup the repository required.
curl -sL https://rpm.nodesource.com/setup_18.x | sudo bash -
NODE_MAJOR=18
sudo dnf install https://rpm.nodesource.com/pub_$NODE_MAJOR.x/nodistro/repo/nodesource-release-nodistro-1.noarch.rpm -y
sudo dnf install nodejs -y
Once the repository is added, run the commands below to install Node.js 18 on CentOS 7 / Fedora together with npm.
sudo dnf -y install gcc-c++ make nodejs
Confirm the Node.js version available in your system.
$ node -v
v18.18.2
Installing development tools to build native Node.js addons:
sudo yum install make gcc-c++
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 -y install yarn
Enjoy your Node.js development on CentOS 7 & Fedora Linux systems.
Books For Learning Node.js programming:
Similar guides.
- How To Install Node.js on Ubuntu / Debian / Linux Mint
- Install Node.js 12 LTS on CentOS / Fedora
- Install Node.js 12 LTS on Ubuntu/Debian
Unfortunately, this doesn’t work:
https://stackoverflow.com/questions/72571235/can-i-install-node-js-18-on-centos-7-and-do-i-need-python-3-install-too
Output from your commands:
Error: Package: 2:nodejs-18.16.0-1nodesource.x86_64 (nodesource)
Requires: libstdc++.so.6(GLIBCXX_3.4.20)(64bit)
Error: Package: 2:nodejs-18.16.0-1nodesource.x86_64 (nodesource)
Requires: libstdc++.so.6(GLIBCXX_3.4.21)(64bit)
Error: Package: 2:nodejs-18.16.0-1nodesource.x86_64 (nodesource)
Requires: libm.so.6(GLIBC_2.27)(64bit)
Error: Package: 2:nodejs-18.16.0-1nodesource.x86_64 (nodesource)
Requires: libstdc++.so.6(CXXABI_1.3.9)(64bit)
Error: Package: 2:nodejs-18.16.0-1nodesource.x86_64 (nodesource)
Requires: libc.so.6(GLIBC_2.28)(64bit)