Last active
December 16, 2015 20:59
-
-
Save stephanetimmermans/5496788 to your computer and use it in GitHub Desktop.
Install node + npm on Ubuntu 13.04
This file contains hidden or 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
sudo apt-get install build-essential libssl-dev curl | |
# The install script | |
# Adapted from https://gist.github.com/579814 | |
echo '# Added by install script for node.js and npm in 30s' >> ~/.bashrc | |
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
echo 'export NODE_PATH=$HOME/local/lib/node_modules' >> ~/.bashrc | |
. ~/.bashrc | |
mkdir -p ~/local | |
mkdir -p ~/Downloads/node-latest-install | |
cd ~/Downloads/node-latest-install | |
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
./configure --prefix=~/local # if SSL support is not required, use --without-ssl | |
make install | |
node -v | |
npm -v | |
#In case of bash: /usr/local/bin/npm: No such file or directory | |
hash -r | |
npm -v |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Worked pretty good for me until I got to the point where it tried to run node -v ... apparently the echo 'exports' didn't work. I guess it would be good if you didn't run those until you like restarted the terminal or just source ~/.bashrc
Check my fork
https://gist.github.com/Goddard/5500157