Created
January 20, 2011 17:13
-
-
Save okor/788206 to your computer and use it in GitHub Desktop.
Install node.js on Ubuntu 10.10
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
# 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" |
I think that may fix it.
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
Great script, but fails on 2 points:
git://github.com/joyent/node.git
export PATH=$HOME/.local/programs/bin:$PATH
needs to be run by itself in order to allow npm to install.