Last active
December 23, 2015 01:34
-
-
Save multidis/f918e5868988bef11e44 to your computer and use it in GitHub Desktop.
Node.js providing `node` and `npm` commands on Ubuntu 14.04.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# use Node.js-maintained repositories | |
# http://www.hostingadvice.com/how-to/install-nodejs-ubuntu-14-04/ | |
curl -sL https://deb.nodesource.com/setup | sudo bash - | |
sudo apt-get install nodejs | |
# update npm | |
sudo npm install --global npm@latest | |
# verify | |
node --version | |
npm --version | |
# another set of instructions: update node using npm itself | |
# http://askubuntu.com/questions/426750/how-can-i-update-my-nodejs-to-the-latest-version | |
sudo npm cache clean -f | |
sudo npm install -g n | |
sudo n stable | |
## see mkdir-output and use it below in place of <version> | |
## verify the last part is what `which node` shows | |
sudo ln -sf /usr/local/n/versions/node/<VERSION>/bin/node /usr/local/bin/node |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment