Created
March 23, 2015 11:16
-
-
Save saxbophone/a12804679d0a9cfef6d2 to your computer and use it in GitHub Desktop.
Install latest working version of node and npm on raspberry pi
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
#!/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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Changed version numbers, originally from http://oskarhane.com/raspberry-pi-install-node-js-and-npm/