Monday, September 17, 2012

How To Install Node.js on RasberryPi

This will let you install the latest version of node.js on a Raspberry Pi running occidentalis 0.2:


git clone https://github.com/joyent/node.git
cd node
export GYP_DEFINES="armv7=0"
export CXXFLAGS='-march=armv6 -mfpu=vfp -mfloat-abi=hard -DUSE_EABI_HARDFLOAT'
export CCFLAGS='-march=armv6 -mfpu=vfp -mfloat-abi=hard -DUSE_EABI_HARDFLOAT'
./configure --shared-openssl --without-snapshot
make
make install


Compiling node will take about 4-5 hours.

but at the end you will be rewarded with:

pi@raspberrypi ~ $ node --version
v0.9.2-pre

1 comment:

  1. Nice try, but like every other tutorial for installing node on Pi, whilst node --version will work, try to actually use node or npm and you will receive the useless "illegal instruction" bomb.

    ReplyDelete