Node.js on RPi

From eLinux.org
Revision as of 21:45, 30 March 2013 by Tomap (Talk | contribs) (Created page with "Node.js works on Rapsberry Pi. Currently, it is possible to install Node.js version 0.6 using apt-get. If you want a more recent version, you will need to compile it. == Inst...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Node.js works on Rapsberry Pi. Currently, it is possible to install Node.js version 0.6 using apt-get. If you want a more recent version, you will need to compile it.

Install Node.js 0.6

Simply call:

apt-get install nodejs

Install latest version of Node.js

Go to Nodejs.org and copy the source code download url. In my example: http://nodejs.org/dist/v0.10.2/node-v0.10.2.tar.gz

Create a file called install-node.sh and paste the folloing code:

wget http://nodejs.org/dist/v0.10.2/node-v0.10.2.tar.gz
tar -xzf node-v0.10.2.tar.gz
cd node-v0.10.2
./configure
make
sudo make install

Node that in your case, you may need to change the bold parts according to the version you want

The compilation will run for 1 or 2 hours on RPi. If you are doing that using ssh connection, you may want to install screen: It will allow you to close the ssh connection without killing the conpilation process. See http://www.howtoforge.com/linux_screen

Those instructions have been tested with Node.js 0.10.2