Closed kaiser-ren closed 8 years ago
@kaiser-ren please make sure your system has the node-gyp requirements.
https://github.com/nodejs/node-gyp#installation
As also discussed in https://github.com/sandeepmistry/node-bluetooth-hci-socket/issues/17. Maybe python is misconfigured on your system.
I want to install bluetooth-hci-socket on my openwrt device which is mips and the chipset is mt7628 from MTK, but the log of installation is here, failed.
**root@OpenWrt:~/gateway# npm install bluetooth-hci-socket npm WARN package.json Smart_Gateway@1.0.1 No repository field. npm WARN package.json Smart_Gateway@1.0.1 No README data npm WARN package.json Smart_Gateway@1.0.1 license should be a valid SPDX license expression |
gyp ERR! configure error gyp ERR! stack Error: Command failed: /usr/bin/python2 -c import platform; print (platform.python_version()); gyp ERR! stack gyp ERR! stack at ChildProcess.exithandler (child_process.js:751:12) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at maybeClose (child_process.js:1015:16) gyp ERR! stack at Process.ChildProcess._handle.onexit (child_process.js:1087 :5) gyp ERR! System Linux 3.18.27 gyp ERR! command "/usr/bin/node" "/root/gateway/node_modules/node-gyp/bin/node-g yp.js" "configure" "--fallback-to-build" "--module=/root/gateway/node_modules/bl uetooth-hci-socket/node_modules/usb/src/binding/usb_bindings.node" "--module_nam e=usb_bindings" "--module_path=/root/gateway/node_modules/bluetooth-hci-socket/n ode_modules/usb/src/binding" gyp ERR! cwd /root/gateway/node_modules/bluetooth-hci-socket/node_modules/usb gyp ERR! node -v v0.12.7 gyp ERR! node-gyp -v v3.3.1 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/node /root/gateway/no de_modules/node-gyp/bin/node-gyp.js configure --fallback-to-build --module=/root /gateway/node_modules/bluetooth-hci-socket/node_modules/usb/src/binding/usb_bind ings.node --module_name=usb_bindings --module_path=/root/gateway/node_modules/bl uetooth-hci-socket/node_modules/usb/src/binding' (1) node-pre-gyp ERR! stack at ChildProcess. (/root/gateway/node_modu les/bluetooth-hci-socket/node_modules/usb/node_modules/node-pre-gyp/lib/util/com pile.js:83:29)
node-pre-gyp ERR! stack at ChildProcess.emit (events.js:110:17)
node-pre-gyp ERR! stack at maybeClose (child_process.js:1015:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (child_proces s.js:1087:5)
node-pre-gyp ERR! System Linux 3.18.27
node-pre-gyp ERR! command "node" "/root/gateway/node_modules/bluetooth-hci-socke t/node_modules/usb/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-buil d"
node-pre-gyp ERR! cwd /root/gateway/node_modules/bluetooth-hci-socket/node_modul es/usb
node-pre-gyp ERR! node -v v0.12.7
node-pre-gyp ERR! node-pre-gyp -v v0.6.24
node-pre-gyp ERR! not ok
Failed to execute '/usr/bin/node /root/gateway/node_modules/node-gyp/bin/node-gy p.js configure --fallback-to-build --module=/root/gateway/node_modules/bluetooth -hci-socket/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bin dings --module_path=/root/gateway/node_modules/bluetooth-hci-socket/node_modules /usb/src/binding' (1)
npm WARN optional dep failed, continuing usb@1.1.2
gyp ERR! configure error gyp ERR! stack Error: Command failed: /usr/bin/python2 -c import platform; print (platform.python_version()); gyp ERR! stack gyp ERR! stack at ChildProcess.exithandler (child_process.js:751:12) gyp ERR! stack at ChildProcess.emit (events.js:110:17) gyp ERR! stack at maybeClose (child_process.js:1015:16) gyp ERR! stack at Socket. (child_process.js:1183:11)
gyp ERR! stack at Socket.emit (events.js:107:17)
gyp ERR! stack at Pipe.close (net.js:485:12)
gyp ERR! System Linux 3.18.27
gyp ERR! command "node" "/root/gateway/node_modules/.bin/node-gyp" "rebuild"
gyp ERR! cwd /root/gateway/node_modules/bluetooth-hci-socket
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v3.3.1
gyp ERR! not ok
npm ERR! Linux 3.18.27
npm ERR! argv "/usr/bin/node" "/usr/bin/npm" "install" "bluetooth-hci-socket"
npm ERR! node v0.12.7
npm ERR! npm v2.11.3
npm ERR! code ELIFECYCLE
npm ERR! bluetooth-hci-socket@0.4.4 install:
node-gyp rebuild
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bluetooth-hci-socket@0.4.4 install script 'node-gyp rebui ld'. npm ERR! This is most likely a problem with the bluetooth-hci-socket 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 bluetooth-hci-socket npm ERR! There is likely additional logging output above.npm ERR! Please include the following file with any support request: npm ERR! /root/gateway/npm-debug.log**