First of all check your ubuntu version by entering the following command:
lsb_release-a
Confirm the compatibility of nodejs according to your ubuntu version: here
and then enter following command to download the nodejs setup:
curl -fsSL https://deb.nodesource.com/setup_23.x -o nodesource_setup.sh
for example, if you want to download nodejs 20 replace 23.x by 20.xNow run the setup by entering the following command:
sudo -E bash nodesource_setup.sh
Once its done you will see > successfully configured repository
then enter below command to install the nodejs:
sudo apt install -y nodejs
Enter
node -v
to check version and confirm if nodejs is successfully installed.
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (0)