LoginSignup
7
2

More than 5 years have passed since last update.

Raspberry Pi 3で作ったSDカードをRaspberry Pi Zeroで動かしたらnodejsで「Illegal Instruction」エラー

Posted at

状況

自宅の環境で、raspi3で試行錯誤してできあがったものをSDカード丸コピしてraspi zeroに移植して、運用。raspi3は次の何かの開発に使い続ける。
みたいなことをやってたら、raspi zeroでnodejs動くタイミングで、
Illegal Instruction
とエラーが出た。

結論

raspi zeroにてdpkgでnodeとnpmを再インストールすれば、エラー出なくなった!!

解決まで

色々ぐぐってたところ、下記参考にあるように、ARMアーキテクチャの違いにより発生するらしい。なるほど〜

参考
https://ja.stackoverflow.com/questions/17639/illegal-instruction%E3%81%A8%E3%81%84%E3%81%86%E3%82%A8%E3%83%A9%E3%83%BC%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6
http://www.schrankmonster.de/2014/03/22/install-nodejs-npm-raspberrypi-illegal-instruction-error-messages/

7
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
2