Dec 14, 2014

Pidora Node.js quickstart

I have been using pidora (a fedora remix) for my raspberry pi experiments. So far, pidora has been treating me fine. However, you can quickly notice that pidora lacks documentation compared to debian based raspbian, so here is my instructions for getting node.js to work on pidora.

Actually, if you try to install node.js from yum repository, you will notice that node.js is available and can be installed. In fact, it was version 0.10.25, which was OK, when I was writing this.  However, when I tried to run an application with it, it failed with the message "Binary compiled with -mfloat-abi=hard but without -DUSE_EABI_HARDFLOAT". As one can imagine, I have not pursued further this road and looked other options.

So next option is to get node.js directly from the node.js distribution. First download the latest arm build for node.js. Although the latest release for node.js is 0.10.33, the latest ARM build I could find was 0.10.28.


Next extract the contents, move contents to /opt/node and link the bin folder to /opt/bin. I guess you can use different directories but can't imagine why.

tar xvzf node-v*
mv node-v* /opt/node
mkdir /opt/bin
ln -s /opt/node/bin/* /opt/bin/

Check that PATH includes /opt/bin. If it does not, edit /etc/profile to include it on PATH.  Now you should be all set. Of course, you need a library for accessing GPIO, and have your LEDs blinking but that is subject for another post.