lprhodes / homebridge-broadlink-rm

Broadlink RM Mini and Pro plugin for homebridge: https://github.com/nfarina/homebridge
Apache License 2.0
571 stars 284 forks source link

Erro installing homebridge-broadlink-rm in raspberry pi #646

Open uticket opened 4 years ago

uticket commented 4 years ago

I have node version v.14.4.0, i installed last version of homebridge UI X. Its working. But when i try install this plugin, i get this error:

`root@raspberrypi:~# npm i -g homebridge-broadlink-rm

raw-socket@1.7.0 install /usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/raw-socket node-gyp rebuild

gyp WARN EACCES current user ("nobody") does not have permission to access the dev dir "/root/.cache/node-gyp/14.4.0" gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/raw-socket/.node-gyp" gyp WARN install got an error, rolling back install gyp WARN install got an error, rolling back install gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/raw-socket/.node-gyp' gyp ERR! System Linux 4.19.66-v7+ 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 /usr/local/lib/node_modules/homebridge-broadlink-rm/node_modules/raw-socket gyp ERR! node -v v14.4.0 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! raw-socket@1.7.0 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the raw-socket@1.7.0 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /root/.npm/_logs/2020-06-15T06_43_57_361Z-debug.log root@raspberrypi:~# `

i think should be related to node version, or something like it.. I am using last version of node..

MrClou1A commented 4 years ago

same for me...

node -v v10.21.0 gyp ERR! node-gyp -v v5.1.0 gyp ERR! not ok

JulianNaumann commented 4 years ago

I had a similar issue. Running this fixed it for me:

sudo chown $USER /usr/lib/node_modules

If not, try running your install command with sudo.