我一直在尝试在Synology nas的chroot上安装homebridge,并在尝试使用npm进行安装时不断出现此错误。我一直在遵循本教程https://medium.com/@gregwym/setup-homebridge-on-synology-nas-without-docker-f42edd174d0e
的每个步骤npm WARN engine homebridge@0.4.45: wanted: {"node":">=4.3.2"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine hap-nodejs@0.4.47: wanted: {"node":">=4.3.2"} (current: {"node":"0.10.29","npm":"1.4.21"})
npm WARN engine curve25519-n@1.4.0: wanted: {"node":">=4.8.0"} (current: {"node":"0.10.29","npm":"1.4.21"})
-
> curve25519-n@1.4.0 install /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/curve25519-n
> node-gyp rebuild
gyp: Call to 'node -e "require('nan')"' returned exit status 1. while trying to load binding.gyp
gyp ERR! configure error
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:344:16)
gyp ERR! stack at ChildProcess.emit (events.js:98:17)
gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:809:12)
gyp ERR! System Linux 3.10.105
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/curve25519-n
gyp ERR! node -v v0.10.29
gyp ERR! node-gyp -v v0.12.2
gyp ERR! not ok
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
> ed25519-hap@0.0.5 install /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/node_modules/ed25519-hap
> node-gyp rebuild
node.js:815
var cwd = process.cwd();
^
Error: ENOENT, no such file or directory
at Function.startup.resolveArgv0 (node.js:815:23)
at startup (node.js:58:13)
at node.js:906:3
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
npm ERR! curve25519-n@1.4.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the curve25519-n@1.4.0 install script.
npm ERR! This is most likely a problem with the curve25519-n 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 their info via:
npm ERR! npm owner ls curve25519-n
npm ERR! There is likely additional logging output above.
npm ERR! System Linux 3.10.105
npm ERR! command "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "--unsafe-perm" "homebridge"
npm ERR! cwd /
npm ERR! node -v v0.10.29
npm ERR! npm -v 1.4.21
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR! /npm-debug.log
npm ERR! not ok code 0