Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Working Node.js on Raspberry Pi
These instructions should be deprecated at this point.
Start following https://github.com/TooTallNate/node/tree/pi for a more straightforward node installation on the pi.
----
These instructions work for the Raspberry Pi running Raspbian (hard float), and include a working NPM:
1. Install Raspbian - http://www.raspbian.org/PiscesImages
2. sudo apt-get install git-core build-essential
3. Check out Node.js source (0.8.4)
4. Set up some variables:
$ 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'
5. Configure correctly:
$ ./configure --shared-openssl --without-snapshot
$ make
$ make test
$ make install
NOTE: some ssl related tests still have issues, so this is NOT a final fix.
@abulte

This comment has been minimized.

Copy link

@abulte abulte commented Sep 13, 2012

Not working for me :-(
Fresh 2012-08-16-wheezy-raspbian, node-0.8.9.
At the end of make (no obvious errors), every test crashes and all binaries return Illegal instruction.

@JerrySievert

This comment has been minimized.

Copy link
Owner Author

@JerrySievert JerrySievert commented Sep 18, 2012

@TooTallNate has been working on a branch that makes things much cleaner:

https://github.com/TooTallNate/node/tree/pi

@GriffenJBS

This comment has been minimized.

Copy link

@GriffenJBS GriffenJBS commented Sep 23, 2012

I followed these instructions and I also tried with node-v0.8.9 on raspbian. I also get the Illegal instruction error. I ran it through gdb and found a little more detail.

Program received signal SIGILL, Illegal instruction.
0x400d64c0 in ?? () from /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0

I did a git clone git://github.com/TooTallNate/node.git
git checkout pi
./configure --shared-openssl --without-snapshot
make
make test

almost 19 minutes later I had all but 8 tests passed, and a 4 of those were timeouts a known issue with a slower system like the pi.
@GriffenJBS

This comment has been minimized.

Copy link

@GriffenJBS GriffenJBS commented Sep 23, 2012

markdown got me ...

I followed these instructions and I also tried with node-v0.8.9 on raspbian. I also get the Illegal instruction error. I ran it through gdb and found a little more detail.

Program received signal SIGILL, Illegal instruction.
0x400d64c0 in ?? () from /usr/lib/arm-linux-gnueabihf/libcrypto.so.1.0.0

I did a git clone git://github.com/TooTallNate/node.git
git checkout pi
./configure --shared-openssl --without-snapshot
make

then

make test
[18:44|% 100|+ 444|- 8]: Done

almost 19 minutes later I had all but 8 tests passed, and a 4 of those were timeouts a known issue with a slower system like the pi.

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