Debian install node9/24/2023 Node.js binary distributions are available from NodeSource. Node.js binary distributions maintained and supported by NodeSourceĭebian and Ubuntu based Linux distributions.Node.js snaps maintained and supported at.These resources provide packages compatible with CentOS, Fedora, and RHEL. But installing from a PPA and working with npm or nvm offers additional flexibility.Dnf module install nodejs:18/common Alternatives Depending on the circumstances, you can choose one of the methods you learned in this article. nvm deactivateĪs you see, there are a few ways to get up and running with Node.js on your Debian 10 server. If the currently active version and the version you are targeting are the same, deactivate nvm to enable your changes. If the currently active version and the version you are targeting are not the same, type nvm uninstall node_version To continue, you need to determine the version you would like to remove is the currently active version or not, so, run the following command. So you will need to work with the apt utility at the system level. Depending on the version you want to target, you can uninstall Node.js using apt or nvm. nvm use default Removing Node.jsįinally, it is time to learn how to remove versions installed from the Debian repository or from the PPA. When a new session spawns, this version will be automatically selected. nvm lsĪnd if you want to default to a specific version. In case, you have multiple Node.js versions, you can see what is installed. To verify the Node.js version currently being used or not, use the below command. You can also tell nvm to use the version you just downloaded nvm use 10.16.2 Nvm, would use the most recently installed version by default. Since the nvm is installed, you can install isolated Node.js versions, by typing the below command, you will get information about the versions of Node.js that are available. Now, you need to log out and log back in again or source the ~/.profile file to access the nvm functionality and let the session knows about the changes. Then, run the script using bash and exit your text editor. To verify the installation script with nano: install_nvm.sh Please note that the version number may differ from the highlighted below. While you are controlling your environment with nvm, you are able to access the newest versions of Node.js while also retaining and managing previous releases. You can install multiple self-contained versions of Node.js without affecting the entire system. The other alternative to installing Node.js through apt is to use a tool called Node Version Manager ( nvm). Since you need the npm packages to work, you will need to install the build-essential package: sudo apt install build-essential To verify the installation by running node with the -v version option, type: node -v Now you can install the nodejs package in the same way, as the PPA will be added to your configuration and your local package cache will be updated automatically. Then, run the script using sudo and exit your text editor. To verify the contents of this script with nano (or your preferred text editor) : nano nodesource_setup.sh Note: Ensure to replace 12.x with your preferred version string. cd ~ curl -sL 12.x -o nodesource_setup.sh When you install PPA, this will add the repository to our package list and allow us to install the new packages using apt. It still works with apt and will have more up-to-date versions of Node.js than the official Debian repositories. If you want to work with an alternate repository, you can install from PPA (personal package archive) maintained by NodeSource.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |