How do I update Node 6.4.0
to 6.5.0
on Ubuntu 16.04 via apt
package manager?
2 Answers
It's better to use nvm (node version manager) due to its flexibility and it allows you to easily switch versions.
It's simple to install; run:
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
then:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
once it's installed (restart session if necessary), install and switch version by running these simple commands:
nvm install 9 # will install version 9 of node
nvm use 9 # will switch to version 9
nvm alias default 9 # will use version by default upon boot

- 499
You might consider adding the node sources ppa to your set up. There are instructions here.
You could also try nave which is a non-apt way managing the versions of node on your system. Running sudo nave usemain 6.5.0
will install 6.5.0
to your system folders though I'd recommend using the nave.sh
sub-shell approach to access different versions of node without doing central installs.

- 116