Installing the latest version of node js on the beaglebone

Warning: Cloud9 IDE
If you do this, the Cloud9 IDE will stop working…
Cloud9 only works with earlier versions of node.js at this time.
Try at your own risk, backup everything!

This is useful if you want to install the latest version of node.js on the beaglebone. Unfortunately many of these new version’s are not tested so please be sure to back up your files before going ahead.

Run the following on the command line (preferably from /home/root):

wget http://nodejs.org/dist/v0.6.12/node-v0.6.12.tar.gz
tar xf node-v0.6.12.tar.gz
cd node-v0.6.12


The most difficult thing I had trouble tracking down was a minor change in the file:

node-vx.x/deps/v8/SConstruct

You need to edit this file and modify
line # 84 it should look like this:

'gcc': {
    'all': {
      'CCFLAGS':      ['$DIALECTFLAGS', '$WARNINGFLAGS', '-march=armv7-a'],
      'CXXFLAGS':     ['-fno-rtti', '-fno-exceptions'],
    },

*You need to add -march=armv7-a


Go to the downloaded node.js directory (e.g. node-v0.6.12) and run the following on the command line (found this here):

export CC=’gcc -march=armv7-a -mtune=cortex-a8′
export CXX=’g++ -march=armv7-a -mtune=cortex-a8′
./configure
make
make install

After running ‘make’, it will take a long time so be prepared to wait.

This entry was posted in beaglebone. Bookmark the permalink.

One Response to Installing the latest version of node js on the beaglebone

  1. Seeker says:

    thx. worked like a charm!

Leave a Reply

Your email address will not be published. Required fields are marked *