I'm trying to get node.js v0.7.9 to compile for the raspberry pi, but as node and v8 are quite large, I'm hoping to be able to cross-compile on another more powerful PC. I'm using the linux-x86 arm-bcm2708-linux-gnueabi
toolchain from https://github.com/raspberrypi/tools and have used them to successfully build other executables for the system. I ended up setting the CC,CXX,CPP,STRIP,OBJCOPY,etc. variables to the toolchain equivalents in the environmental variables and ran configure with: ./configure --dest-cpu=arm --without-snapshot
to get the final executable. Copying it over to the system and running it however produces the following error:
Extension or internal compilation error at line 0. Segmentation fault
However, the segmentation fault doesn't happen for any of the non-javascript tasks like node --version
and node --help
. Are there any CFLAGS/CXXFLAGS I might be missing causing this problem? Bit confused....
NodeJS is a powerful JavaScript runtime environment that allows you to run JavaScript natively without a web browser. Thanks to its speed and relative ease of use, it is a fantastic framework to run on the Raspberry Pi. If you have had any issues installing the software, please leave a comment below.
NodeJS is available pre-compiled for a few Linux distributions: https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
Since NodeJS is still in testing phase for Debian, in order to install NodeJS on my Raspberry Pi under Debian wheezy, I do:
sudo su echo deb ftp://ftp.dk.debian.org/debian/ sid main > /etc/apt/sources.list.d/sid.list apt-get update apt-get install nodejs rm /etc/apt/sources.list.d/sid.list apt-get update exit
NodeJS works very fine and stable on my Raspberry Pi.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With