
Method 3 – Installing NodeJs using NVM on Debian 11
Installing “build-essential” – To get the needy tools to work with npm package, run the below mentioned command: sudo apt install build-essential. Check Version – Now verify installation by checking version number of NodeJs: node -v. Install NodeJs – Now after adding PPA, install NodeJs using below mentioned command, we don’t need to install npm separately here as it is already included in package: sudo apt install nodejs. The PPA is added to your settings and the local package cache is instantly updated. Run the Script – After configuring the script, run the script using below mentioned command: sudo bash nodesource_setup.sh. Configure NodeSource setup – Run the below mentioned to inquire newly downloaded script, it will open a file and after inspecting the file press Ctrl+X to exit the file and return to terminal: nano nodesource_setup.sh. You can replace “version number” with the version you want to install, here I am installing stable version “16.x” by below mentioned command: curl -sL -o nodesource_setup.sh Install PPA – To install NodeJs Package using “Apt”, add the repository to Package list using below-mentioned syntax:Ĭurl -sL -o nodesource_setup.sh. This is an alternative repository containing ‘Apt’ and contains current versions than the official Debian repositories for NodeJs.įollow the steps below for successful installation of NodeJs using PPA:
You can use a PPA (Personal Package Archive) provided by NodeSource to operate with the latest version of NodeJs. Method 2 – How to install NodeJs using NodeSource PPA Check Version – To verify the correct version installation of NodeJs, run the below mentioned command to check version number of recently installed NodeJs: node -v.Install Nodejs and NPM – The “npm” is the package manager of NodeJs, run the below mentioned command to install NodeJs and npm on Debian 11: sudo apt install nodejs npm.
Update Packages – First update all the packages previously installed in the System by below mentioned command: sudo apt update. To get this version of NodeJs on your Debian system follow the steps mentioned below: Method 1 – Installing Nodejs from Debian RepositoryĪt the time of writing this tutorial, the Node.js 12.22.5 version is available under default repositories.
Installing Node.js from Debian Repository.Given below are three methods to install NodeJs on Debian 11, you can follow any of these you find easier for successful installation: It is available for all Operating Systems in this article, you will learn how to install NodeJs on your Debian system (Linux OS) so that you can build amazing applications using NodeJs.