Skip to content

Instantly share code, notes, and snippets.

@okor
Created January 20, 2011 17:13
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save okor/788206 to your computer and use it in GitHub Desktop.
Save okor/788206 to your computer and use it in GitHub Desktop.
Install node.js on Ubuntu 10.10
# As of 10/07/2011, this bash script installs Node.js
# and npm (a node package manager) on Ubuntu 10.10 or 10.04 x64.
# This installs node in your home directory (~/.local/programs)
#
# by okor
#
# Copy, Paste and Run in a terminal:
echo "Install required packages" && \
sudo apt-get update && \
sudo apt-get install git-core build-essential openssl libssl-dev && \
echo "Install node" && \
mkdir -p ~/.local/programs && \
git clone git://github.com/joyent/node.git && \
cd node && \
./configure --prefix=~/.local/programs && \
make install && \
echo 'export PATH=$HOME/.local/programs/bin:$PATH' >> ~/.bashrc && \
source ~/.bashrc && \
echo "Install npm" && \
cd && \
git clone git://github.com/isaacs/npm.git && \
cd npm && \
make install # or `make link` for bleeding edge && \
cd && \
# Make sure is succeeded:
echo "node:" `node -v`
echo "npm:" `npm -v`
echo "All Done"
@wjcrowcroft
Copy link

Great script, but fails on 2 points:

  • Node's repository is now at git://github.com/joyent/node.git
  • Seems like this line export PATH=$HOME/.local/programs/bin:$PATH needs to be run by itself in order to allow npm to install.

@okor
Copy link
Author

okor commented Oct 7, 2011

I think that may fix it.

@wjcrowcroft
Copy link

Cool! Will try it out in a few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment