Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

node.js

dnf

rhel8

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.

like image 804
ruwin_rmrr Avatar asked Oct 28 '25 01:10

ruwin_rmrr


1 Answers

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
like image 140
Udara Suranga Avatar answered Oct 30 '25 13:10

Udara Suranga



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!