Installing NodeJS on A Low-Power ARM Device

1

1

I have an ARM device running Linux. It doesn't have any internet connection besides a direct intranet connection to a host computer with internet (I can get files from the network on to it). I would like to install NodeJS, but they don't have an official generic ARM installer on their website, and I don't have direct access to any of the traditional package APT repositories.

Is there a prebuilt ARM image available that I can install? If not, how would I go about cross-compiling it?

Wasabi Fan

Posted 2014-04-09T02:19:10.930

Reputation: 320

Answers

1

An update regarding this: Since node v4.0.0 there is now precompiled binaries for armv6, armv7 and armv8 (64-bit) which should be installable on most platforms.

https://nodejs.org/en/download/

If you are unsure which version you should be running, the original Pi (both A, B and B+) uses armv6, the pi2 uses armv7.

Armv6 is a very old architecture, and isn't very common anymore.

jishi

Posted 2014-04-09T02:19:10.930

Reputation: 291

1

Just spent a couple hours trying to figure this out.

  1. Check your ARM version: cat /etc/*release (you should see either 6, 7 or 8)
  2. Get the correct URL for your version from https://nodejs.org/en/download/ (under ARM Binaries) and run wget {{URL}}
  3. Extract the downloaded file tar -xvzf {{FILENAME}}
  4. CD into the extracted folder
  5. Make node and npm global: sudo mv bin/node /usr/local/bin and sudo mv bin/npm /usr/local/bin
  6. Test that node is working node -v (if it doesn't, make sure that /usr/local/bin is in your $PATH)

JC3

Posted 2014-04-09T02:19:10.930

Reputation: 11

and if ARM version is 5? – Michael – 2017-02-23T22:37:26.640

0

Follow this guide, you just need to compile it the standard Linux way, download the .tar.gz source file, decompress it, them move it to the device, run ./configure; make; make install and viola.

user270595

Posted 2014-04-09T02:19:10.930

Reputation: