Skip to content

Instantly share code, notes, and snippets.

@saxbophone
Created March 23, 2015 11:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saxbophone/a12804679d0a9cfef6d2 to your computer and use it in GitHub Desktop.
Save saxbophone/a12804679d0a9cfef6d2 to your computer and use it in GitHub Desktop.
Install latest working version of node and npm on raspberry pi
#!/bin/bash
#Make a new dir where you'll put the binary
sudo mkdir /opt/node
#Get it
wget http://nodejs.org/dist/v0.11.3/node-v0.11.3-linux-arm-pi.tar.gz
#unpack
tar xvzf node-v0.11.3-linux-arm-pi.tar.gz
#Copy to the dir you made as the first step
sudo cp -r node-v0.11.3-linux-arm-pi/* /opt/node
#Add node to your path so you can call it with just "node"
cd ~
nano .bash_profile
#Add these lines to the file you opened
PATH=$PATH:/opt/node/bin
export PATH
#Save and exit
#Test
node -v
npm -v
@saxbophone
Copy link
Author

Changed version numbers, originally from http://oskarhane.com/raspberry-pi-install-node-js-and-npm/

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