Skip to content

Instantly share code, notes, and snippets.

@okor
Created January 20, 2011 17:13
Show Gist options
  • 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