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?

2

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)
1
  • and if ARM version is 5? – Michael Feb 23 '17 at 22:37
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.

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.