raspi-io: Install failiure
I am trying into npm install raspi-io but getting the following error warnings when I run sudo npm install raspi-io --save
Raspberry Pi: Jessie Node: 4.2.1 NPM: 3.5.1
raspi-gpio@2.1.0 install /var/www/html/raspberry-js/node_modules/raspi-gpio node-gyp rebuild
gyp WARN EACCES user “root” does not have permission to access the dev dir “/root/.node-gyp/4.2.1”
gyp WARN EACCES attempting to reinstall using temporary dev dir “/var/www/html/raspberry-js/node_modules/raspi-gpio/.node-gyp”
make: Entering directory ‘/var/www/html/raspberry-js/node_modules/raspi-gpio/build’
CXX(target) Release/obj.target/addon/src/addon.o
CXX(target) Release/obj.target/addon/src/init.o
…/src/init.cc:27:22: fatal error: wiringPi.h: No such file or directory
#include <wiringPi.h>
^
compilation terminated.
addon.target.mk:91: recipe for target ‘Release/obj.target/addon/src/init.o’ failed
make: *** [Release/obj.target/addon/src/init.o] Error 1
make: Leaving directory ‘/var/www/html/raspberry-js/node_modules/raspi-gpio/build’
gyp ERR! build error
gyp ERR! stack Error: make
failed with exit code: 2
gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:276:23)
gyp ERR! stack at emitTwo (events.js:87:13)
gyp ERR! stack at ChildProcess.emit (events.js:172:7)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
gyp ERR! System Linux 4.1.13+
gyp ERR! command “/usr/local/bin/node” “/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js” “rebuild”
gyp ERR! cwd /var/www/html/raspberry-js/node_modules/raspi-gpio
gyp ERR! node -v v4.2.1
gyp ERR! node-gyp -v v3.2.0
gyp ERR! not ok
npm WARN raspberry-js@1.0.0 No description
npm WARN raspberry-js@1.0.0 No repository field.
npm ERR! Linux 4.1.13+
npm ERR! argv “/usr/local/bin/node” “/usr/local/bin/npm” “install” “raspi-io” “–save”
npm ERR! node v4.2.1
npm ERR! npm v3.5.1
npm ERR! code ELIFECYCLE
npm ERR! raspi-gpio@2.1.0 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the raspi-gpio@2.1.0 install script ‘node-gyp rebuild’.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the raspi-gpio package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs raspi-gpio
npm ERR! Or if that isn’t available, you can get their info via:
npm ERR! npm owner ls raspi-gpio
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request: npm ERR! /var/www/html/raspberry-js/npm-debug.log
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Comments: 28 (11 by maintainers)
@lastmjs I just tweaked raspi-io w/ version 7.0.0 to not include Wiring Pi at all. It’s included by default in Raspbian and shouldn’t be necessary. Removing it simplified a lot of the installation, and hopefully that will work around this issue.
With my PI 3 Model B, installing raspi-io failed saying that wiringPi.h couldn’t be found. I had to separately install wiring pi, and then I could reinstall raspi-io again and it worked.