前提
Raspberry Pi Zero WでFirebaseを使おうとすると、Illegal instruction
が表示されて実行できませんでした。
調べてみるとRaspberry Pi Zero Wのセットアップという記事が見つかったのでそれにならい、npm rebuild --build-from-source grpc
を実行するとエラーが出て実行できません。
これに関しては調べてみましたが分かりませんでした。詳しい方、対処法を教えてください。
発生している問題・エラーメッセージ
コンソールログ
terminal
1pi@raspberrypi:~$ npm rebuild --build-from-source grpc 2 3> grpc@1.16.1 install /home/pi/node_modules/grpc 4> node-pre-gyp install --fallback-to-build --library=static_library 5 6node-pre-gyp WARN Using needle for node-pre-gyp https download 7gyp ERR! configure error 8gyp ERR! stack Error: EACCES: permission denied, mkdir '/home/pi/node_modules/grpc/build' 9gyp ERR! System Linux 4.14.86+ 10gyp ERR! command "/usr/local/nvm/versions/node/v10.14.2/bin/node" "/usr/local/nvm/versions/node/v10.14.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "--fallback-to-build" "--library=static_library" "--module=/home/pi/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc/grpc_node.node" "--module_name=grpc_node" "--module_path=/home/pi/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc" "--napi_version=3" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v64" "--python=python2.7" 11gyp ERR! cwd /home/pi/node_modules/grpc 12gyp ERR! node -v v10.14.2 13gyp ERR! node-gyp -v v3.8.0 14gyp ERR! not ok 15node-pre-gyp ERR! build error 16node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/nvm/versions/node/v10.14.2/bin/node /usr/local/nvm/versions/node/v10.14.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/home/pi/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/pi/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64 --python=python2.7' (1) 17node-pre-gyp ERR! stack at ChildProcess.<anonymous> (/home/pi/node_modules/grpc/node_modules/node-pre-gyp/lib/util/compile.js:83:29) 18node-pre-gyp ERR! stack at ChildProcess.emit (events.js:182:13) 19node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:962:16) 20node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:251:5) 21node-pre-gyp ERR! System Linux 4.14.86+ 22node-pre-gyp ERR! command "/usr/local/nvm/versions/node/v10.14.2/bin/node" "/home/pi/node_modules/grpc/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" "--library=static_library" 23node-pre-gyp ERR! cwd /home/pi/node_modules/grpc 24node-pre-gyp ERR! node -v v10.14.2 25node-pre-gyp ERR! node-pre-gyp -v v0.12.0 26node-pre-gyp ERR! not ok 27Failed to execute '/usr/local/nvm/versions/node/v10.14.2/bin/node /usr/local/nvm/versions/node/v10.14.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --library=static_library --module=/home/pi/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc/grpc_node.node --module_name=grpc_node --module_path=/home/pi/node_modules/grpc/src/node/extension_binary/node-v64-linux-arm-glibc --napi_version=3 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v64 --python=python2.7' (1) 28npm ERR! code ELIFECYCLE 29npm ERR! errno 1 30npm ERR! grpc@1.16.1 install: `node-pre-gyp install --fallback-to-build --library=static_library` 31npm ERR! Exit status 1 32npm ERR! 33npm ERR! Failed at the grpc@1.16.1 install script. 34npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 35 36npm ERR! A complete log of this run can be found in: 37npm ERR! /home/pi/.npm/_logs/2018-12-18T07_20_51_013Z-debug.log 38pi@raspberrypi:~$
試したこと
Python 2.7を導入してみたりしましたがダメでした。
補足情報(FW/ツールのバージョンなど)
terminal
1pi@raspberrypi:~$ node -v 2v10.14.2 3pi@raspberrypi:~$ npm -v 46.5.0 5pi@raspberrypi:~$ lsb_release -a 6No LSB modules are available. 7Distributor ID: Raspbian 8Description: Raspbian GNU/Linux 9.6 (stretch) 9Release: 9.6 10Codename: stretch 11pi@raspberrypi:~$
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。