Wednesday, January 8, 2020

how to update node to v12 in ubuntu

it iis hard to update node to the latest version in ubuntu, even if we added ppa for v8, it will not reflect to v8 from v6.
The following article worked:

use nvm


https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-16-04


  • sudo apt-get update
  • sudo apt-get install build-essential libssl-dev
Once the prerequisite packages are installed, you can pull down the nvm installation script from the project’s GitHub page. The version number may be different, but in general, you can download it with curl:
  • curl -sL https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh -o install_nvm.sh
And inspect the installation script with nano:
  • nano install_nvm.sh
Run the script with bash:
  • bash install_nvm.sh
It will install the software into a subdirectory of your home directory at ~/.nvm. It will also add the necessary lines to your ~/.profile file to use the file.
To gain access to the nvm functionality, you’ll need to log out and log back in again, or you can source the ~/.profile file so that your current session knows about the changes:
  • source ~/.profile
Now that you have nvm installed, you can install isolated Node.js versions.
To find out the versions of Node.js that are available for installation, you can type:
  • nvm ls-remote

No comments:

Post a Comment

Recursive Matrix and the parallel matrix multiplication using crossbeam and generic constant

This was planned project I posted before. Basically in order to evaluate Rust's claim for zero cost abstraction and the effectiveness o...