ruwin_rmrr
ruwin_rmrr

Reputation: 21

How to select the version to install when using dnf in Rhel 8?

I want to install nodejs 18 using the DNF installer, but the default is set to stream 10. How can I change it to select version 18 when installing?

Commands used:

sudo dnf module install nodejs
sudo dnf module install nodejs-18
sudo dnf module install nodejs@18

Any idea what I am missing?

Tried to install nodejs 18, but when I used the following command:

sudo dnf module install nodejs

Only nodejs 10 is installing.

Upvotes: 2

Views: 5867

Answers (1)

Udara Suranga
Udara Suranga

Reputation: 153

First, you need to check available node versions on your server.

dnf module list nodejs

You can view the enabled node version with [e]. Now you need to reset your node version

dnf module reset nodejs

After that, you can enable your preferred node version with this command.

dnf module enable nodejs:18

Upvotes: 4

Related Questions