You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Illegal instruction on ARM Linux (raspberry pi) #5495
Platform: Linux raspberrypi 4.1.13+ _#_826 PREEMPT Fri Nov 13 20:13:22 GMT 2015 armv6l GNU/Linux
After installing nodejs using the package manager as instructed in the docs on raspbery pi, whenever I try to run either npm or node I get a Illegal instruction.
I realize that maybe more information are needed, but I don't know what else to add.
Can you turn on core dumps (ulimit -c unlimited) and run node -e 0? Open the core dump in gdb with gdb node <corefile> and type thread apply all backtrace full followed by disassemble $pc,+32. Please post the output here.
Either you got a wrong binary or we have an issue with OpenSSL. To rule out a possible build issue on our side, can you build from source? Beware, these builds take around 6 hours on that hardware :)
Yeah that download page does explicitly state that only ARMv7 and up are supported, so you guys got a wrong binary. You can download the correct ARMv6 ones at https://nodejs.org/en/download/stable/.
I've also installed via nodesource on a raspberry pi 1, and I have the same error, or Segmentation fault, I don't remember exactly as I'm on a frantic install/uninstall in a desperate attempt to fix some twilight zone errors here.
@matt-napt-get remove it, download the right .deb manually and install it with dpkg -i. If you still get the same error, please post the results of #5495 (comment).
@matt-n@bnoordhuis The Raspberry Pi 1 is an ARMv6 machine but NodeSource only provides ARMv7 builds. The ARMv7 builds from NodeSource are predestined to result in Illegal Instructions on a Raspberry Pi 1. ARMv6 builds are available at https://nodejs.org/dist/, for example, the latest Node.js v6 build for the Raspberry Pi 1 is node-v6.2.0-linux-armv6l.tar.xz and can be found here.
@silverwind thanks for your reply. I did try to install https://nodejs.org/dist/v6.2.1/node-v6.2.1-linux-armv7l.tar.gz
Wow. unzipped it, copied bins and libs and shared to the /usr directories. Yup, it worked. (Thanks). Then npm wouldn't work. After more thrashing, I found a solution on stackoverflow that allows NPM to reinstall and fix links:
@chrispauley you should copy everything that comes with it in to /usr, (actually /usr/local is probably your safest bet and easier to clean up). There's only a couple of top-level files like README.md and LICENCE.md that could be excluded. I normally just tar -Jxf --strip-components=1 -C /usr/local node-whatever.tar.xz. Just make sure you don't have nodejs or npm packages installed from the upstream distro, that's what could be breaking stuff. Also, even easier would be to just use https://github.com/nodesource/distributions to install it, ARMv7 and above is supported and you get it all via apt.
Activity
[-]Illegal instruction on Linux ARM (raspberry pi)[/-][+]Illegal instruction on ARM Linux (raspberry pi)[/+]bnoordhuis commentedon Feb 29, 2016
Can you turn on core dumps (
ulimit -c unlimited) and runnode -e 0? Open the core dump in gdb withgdb node <corefile>and typethread apply all backtrace fullfollowed bydisassemble $pc,+32. Please post the output here.surdu commentedon Feb 29, 2016
Sure thing:
silverwind commentedon Feb 29, 2016
Either you got a wrong binary or we have an issue with OpenSSL. To rule out a possible build issue on our side, can you build from source? Beware, these builds take around 6 hours on that hardware :)
bnoordhuis commentedon Mar 1, 2016
Quick check, does
env OPENSSL_ppccap=0 node -e 0work?apeeters commentedon Mar 2, 2016
@bnoordhuis Nope, same error here.
apeeters commentedon Mar 2, 2016
For reference: all builds seem to fail, I tried several, up to nodejs_4.0.0-1nodesource1~jessie1_armhf.deb.
bnoordhuis commentedon Mar 2, 2016
Right, the armhf package is for ARMv7. The Raspberry Pi is ARMv6.
apeeters commentedon Mar 2, 2016
That explains! For reference, node-v4.3.1-linux-armv6l.tar.gz works fine.
silverwind commentedon Mar 2, 2016
Yeah that download page does explicitly state that only ARMv7 and up are supported, so you guys got a wrong binary. You can download the correct ARMv6 ones at https://nodejs.org/en/download/stable/.
As for ARMv6 support in the install script, I'm not sure where to best post a issue, but it might be https://github.com/nodesource/distributions.
surdu commentedon Mar 3, 2016
I'm trying to install this on a raspberry pi 2, which as far as I understand is ARMv7
silverwind commentedon Mar 3, 2016
@surdu your
unameabove saysarmv6l, isn't it a Rasperry Pi 1?surdu commentedon Mar 3, 2016
Nope, I ran all this on a raspberry pi 2.
surdu commentedon Mar 8, 2016
I've also installed via nodesource on a raspberry pi 1, and I have the same error, or
Segmentation fault, I don't remember exactly as I'm on a frantic install/uninstall in a desperate attempt to fix some twilight zone errors here.matt-n commentedon May 21, 2016
So, I am trying to install node.js using
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -on an RPi 1b and everything seems to unpack and install fine... until I type
node -vThis results in:Illegal Instruction.I type:
node -e 0and I get the same:Illegal Instruction.Any ideas?
bnoordhuis commentedon May 22, 2016
@matt-n
apt-get removeit, download the right .deb manually and install it withdpkg -i. If you still get the same error, please post the results of #5495 (comment).fivdi commentedon May 22, 2016
@matt-n @bnoordhuis The Raspberry Pi 1 is an ARMv6 machine but NodeSource only provides ARMv7 builds. The ARMv7 builds from NodeSource are predestined to result in Illegal Instructions on a Raspberry Pi 1. ARMv6 builds are available at https://nodejs.org/dist/, for example, the latest Node.js v6 build for the Raspberry Pi 1 is
node-v6.2.0-linux-armv6l.tar.xzand can be found here.matt-n commentedon Jun 1, 2016
Thank you! This now works. I appreciate your help!
chrispauley commentedon Jun 7, 2016
Hi. Could someone please re-open this issue and provide a distribution and instructions that work for the raspberry pi 3?
silverwind commentedon Jun 7, 2016
RPI3 can run ARMv7 (from nodesource) and ARMv8 (from https://nodejs.org/dist/). Note that you need a AArch64 kernel for ARMv8.
chrispauley commentedon Jun 7, 2016
@silverwind thanks for your reply. I did try to install https://nodejs.org/dist/v6.2.1/node-v6.2.1-linux-armv7l.tar.gz
Wow. unzipped it, copied bins and libs and shared to the /usr directories. Yup, it worked. (Thanks). Then npm wouldn't work. After more thrashing, I found a solution on stackoverflow that allows NPM to reinstall and fix links:
This script actually worked!
hth someone else.
rvagg commentedon Jun 8, 2016
@chrispauley you should copy everything that comes with it in to /usr, (actually /usr/local is probably your safest bet and easier to clean up). There's only a couple of top-level files like README.md and LICENCE.md that could be excluded. I normally just
tar -Jxf --strip-components=1 -C /usr/local node-whatever.tar.xz. Just make sure you don't havenodejsornpmpackages installed from the upstream distro, that's what could be breaking stuff. Also, even easier would be to just use https://github.com/nodesource/distributions to install it, ARMv7 and above is supported and you get it all via apt.AlessandroBonomo28 commentedon Apr 11, 2025
thank you may god bless you