rxseger / homebridge-bme280

BME280 temperature/humidity/pressure sensor bridge for Homebridge: https://github.com/nfarina/homebridge
MIT License
15 stars 14 forks source link

Error: `make` failed with exit code: 2 #13

Open shidevil opened 4 years ago

shidevil commented 4 years ago

Installing the homebridge-bme280 has error.

Node version 12.13.1 homebridge version 0.4.50

Code entered

sudo npm install -g --unsafe-perm https://github.com/NorthernMan54/homebridge-bme280

Error

i2c.target.mk:109: recipe for target 'Release/obj.target/i2c/src/i2c.o' failed make: *** [Release/obj.target/i2c/src/i2c.o] Error 1 make: Leaving directory '/usr/local/lib/node_modules/homebridge-bme280/node_modules/i2c-bus/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23) gyp ERR! stack at ChildProcess.emit (events.js:210:5) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:272:12) gyp ERR! System Linux 4.19.75-v7+ gyp ERR! command "/usr/local/bin/node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /usr/local/lib/node_modules/homebridge-bme280/node_modules/i2c-bus gyp ERR! node -v v12.13.1 gyp ERR! node-gyp -v v5.0.5 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! i2c-bus@1.2.5 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the i2c-bus@1.2.5 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Lehmann91 commented 4 years ago

Same issue

NorthernMan54 commented 4 years ago

I upped the dependancies on all the packages, and did a test on my machine with node 10.16.3 and it installed fine. Please try installing again

Lehmann91 commented 4 years ago

Can confirm that. Worked on Node.js Version v12.14.1 and npm Version v6.13.6 Thanks!

Lehmann91 commented 4 years ago

Just to add a note on another try: Updating the deps to "dependencies": { "bme280-sensor": "^0.1.7", "debug": "^4.1.1", "mcuiot-logger": "^0.0.12", "moment": "^2.24.0", "fakegato-history": "^0.5.6" } and installing postman-request manually worked for me on node v12.16.1