How To Install nodejs on Fedora 34

nodejs is JavaScript runtime JavaScript runtime

Introduction

In this tutorial we learn how to install nodejs on Fedora 34.

What is nodejs

Node.js is a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices. nodejs 1 14.17.0 1.fc34 x86_64 94 k nodejs-14.17.0-1.fc34.src.rpm updates JavaScript runtime http MIT and ASL 2.0 and ISC and BSD Node.js is a platform built on Chrome’s JavaScript runtime for easily building fast, scalable network applications. Node.js uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, perfect for data-intensive real-time applications that run across distributed devices.

We can use yum or dnf to install nodejs on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install nodejs.

Install nodejs on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install nodejs using dnf by running the following command:

sudo dnf -y install nodejs

Install nodejs on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install nodejs using yum by running the following command:

sudo yum -y install nodejs

How To Uninstall nodejs on Fedora 34

To uninstall only the nodejs package we can use the following command:

sudo dnf remove nodejs

nodejs Package Contents on Fedora 34

/usr/bin/node
/usr/lib/.build-id
/usr/lib/.build-id/52
/usr/lib/.build-id/52/573f0dbe7cd764a754f323c1248ce3124790a2
/usr/lib/dtrace
/usr/lib/dtrace/node.d
/usr/lib/node_modules
/usr/lib/rpm/fileattrs/nodejs_native.attr
/usr/lib/rpm/nodejs_native.req
/usr/share/doc/nodejs
/usr/share/doc/nodejs/AUTHORS
/usr/share/doc/nodejs/CHANGELOG.md
/usr/share/doc/nodejs/GOVERNANCE.md
/usr/share/doc/nodejs/README.md
/usr/share/doc/nodejs/onboarding.md
/usr/share/man/man1/node.1.gz
/usr/share/node
/usr/share/systemtap
/usr/share/systemtap/tapset
/usr/share/systemtap/tapset/node.stp
/usr/bin/node
/usr/lib/.build-id
/usr/lib/.build-id/b9
/usr/lib/.build-id/b9/85c8e465c2847ecf51e07a1e6223f9e2ada1fe
/usr/lib/dtrace
/usr/lib/dtrace/node.d
/usr/lib/node_modules
/usr/lib/rpm/fileattrs/nodejs_native.attr
/usr/lib/rpm/nodejs_native.req
/usr/share/doc/nodejs
/usr/share/doc/nodejs/AUTHORS
/usr/share/doc/nodejs/CHANGELOG.md
/usr/share/doc/nodejs/GOVERNANCE.md
/usr/share/doc/nodejs/README.md
/usr/share/doc/nodejs/onboarding.md
/usr/share/man/man1/node.1.gz
/usr/share/node
/usr/share/systemtap
/usr/share/systemtap/tapset
/usr/share/systemtap/tapset/node.stp
/usr/bin/node
/usr/lib/.build-id
/usr/lib/.build-id/c2
/usr/lib/.build-id/c2/41ec71743210342d7098cfeaf09ad7b53072e1
/usr/lib/dtrace
/usr/lib/dtrace/node.d
/usr/lib/node_modules
/usr/lib/rpm/fileattrs/nodejs_native.attr
/usr/lib/rpm/nodejs_native.req
/usr/share/doc/nodejs
/usr/share/doc/nodejs/AUTHORS
/usr/share/doc/nodejs/CHANGELOG.md
/usr/share/doc/nodejs/GOVERNANCE.md
/usr/share/doc/nodejs/README.md
/usr/share/doc/nodejs/onboarding.md
/usr/share/man/man1/node.1.gz
/usr/share/node
/usr/share/systemtap
/usr/share/systemtap/tapset
/usr/share/systemtap/tapset/node.stp
/usr/bin/node
/usr/lib/.build-id
/usr/lib/.build-id/fc
/usr/lib/.build-id/fc/5f68cfcc5bad0ea8db8b66a10a349e308c2550
/usr/lib/dtrace
/usr/lib/dtrace/node.d
/usr/lib/node_modules
/usr/lib/rpm/fileattrs/nodejs_native.attr
/usr/lib/rpm/nodejs_native.req
/usr/share/doc/nodejs
/usr/share/doc/nodejs/AUTHORS
/usr/share/doc/nodejs/CHANGELOG.md
/usr/share/doc/nodejs/GOVERNANCE.md
/usr/share/doc/nodejs/README.md
/usr/share/doc/nodejs/onboarding.md
/usr/share/man/man1/node.1.gz
/usr/share/node
/usr/share/systemtap
/usr/share/systemtap/tapset
/usr/share/systemtap/tapset/node.stp

References

Summary

In this tutorial we learn how to install nodejs on Fedora 34 using yum and dnf.