noble / node-bluetooth-hci-socket

MIT License
154 stars 185 forks source link

Unable to install hci-socket on Chromebook #60

Closed IgorGanapolsky closed 7 years ago

IgorGanapolsky commented 7 years ago

Hello, I am running Linux Chromebook 4.4.0-59 #80-Ubuntu. I have node 7.7.2 installed. When I run sudo npm install bluetooth-hci-socket, I get this error:

usb@1.2.0 install /home/eazyigz/workspace/crestron/locus_bridge_emu_node/node_modules/usb node-pre-gyp install --fallback-to-build node-pre-gyp ERR! Tried to download: https://github.com/tessel/node-usb/releases/download/1.2.0/usb_bindings-v1.2.0-node-v51-linux-x64.tar.gz node-pre-gyp ERR! Pre-built binaries not found for usb@1.2.0 and node@7.7.2 (node-v51 ABI) (falling back to source compile with node-gyp) make: Entering directory '/home/eazyigz/workspace/crestron/locus_bridge_emu_node/node_modules/usb/build' CC(target) Release/obj.target/libusb/libusb/libusb/core.o CC(target) Release/obj.target/libusb/libusb/libusb/descriptor.o CC(target) Release/obj.target/libusb/libusb/libusb/hotplug.o CC(target) Release/obj.target/libusb/libusb/libusb/io.o CC(target) Release/obj.target/libusb/libusb/libusb/strerror.o CC(target) Release/obj.target/libusb/libusb/libusb/sync.o CC(target) Release/obj.target/libusb/libusb/libusb/os/poll_posix.o CC(target) Release/obj.target/libusb/libusb/libusb/os/threads_posix.o CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_usbfs.o CC(target) Release/obj.target/libusb/libusb/libusb/os/linux_udev.o AR(target) Release/obj.target/usb.a COPY Release/usb.a CXX(target) Release/obj.target/usb_bindings/src/node_usb.o make: g++: Command not found usb_bindings.target.mk:105: recipe for target 'Release/obj.target/usb_bindings/src/node_usb.o' failed make: *** [Release/obj.target/usb_bindings/src/node_usb.o] Error 127 make: Leaving directory '/home/eazyigz/workspace/crestron/locus_bridge_emu_node/node_modules/usb/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:276:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:194:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Linux 4.4.0-59-generic gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/home/eazyigz/workspace/crestron/locus_bridge_emu_node/node_modules/usb/src/binding/usb_bindings.node" "--module_name=usb_bindings" "--module_path=/home/eazyigz/workspace/crestron/locus_bridge_emu_node/node_modules/usb/src/binding" gyp ERR! cwd /home/eazyigz/workspace/crestron/locus_bridge_emu_node/node_modules/usb gyp ERR! node -v v7.7.2 gyp ERR! node-gyp -v v3.5.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/usr/bin/nodejs /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/eazyigz/workspace/crestron/locus_bridge_emu_node/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/home/eazyigz/workspace/crestron/locus_bridge_emu_node/node_modules/usb/src/binding' (1) node-pre-gyp ERR! stack at ChildProcess. (/home/eazyigz/workspace/crestron/locus_bridge_emu_node/node_modules/usb/node_modules/node-pre-gyp/lib/util/compile.js:83:29) node-pre-gyp ERR! stack at emitTwo (events.js:106:13) node-pre-gyp ERR! stack at ChildProcess.emit (events.js:194:7) node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:899:16) node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5) node-pre-gyp ERR! System Linux 4.4.0-59-generic node-pre-gyp ERR! command "/usr/bin/nodejs" "/home/eazyigz/workspace/crestron/locus_bridge_emu_node/node_modules/usb/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build" node-pre-gyp ERR! cwd /home/eazyigz/workspace/crestron/locus_bridge_emu_node/node_modules/usb node-pre-gyp ERR! node -v v7.7.2 node-pre-gyp ERR! node-pre-gyp -v v0.6.30 node-pre-gyp ERR! not ok Failed to execute '/usr/bin/nodejs /usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/home/eazyigz/workspace/crestron/locus_bridge_emu_node/node_modules/usb/src/binding/usb_bindings.node --module_name=usb_bindings --module_path=/home/eazyigz/workspace/crestron/locus_bridge_emu_node/node_modules/usb/src/binding' (1)

bluetooth-hci-socket@0.5.1 install /home/eazyigz/workspace/crestron/locus_bridge_emu_node/node_modules/bluetooth-hci-socket node-gyp rebuild make: Entering directory '/home/eazyigz/workspace/crestron/locus_bridge_emu_node/node_modules/bluetooth-hci-socket/build' CXX(target) Release/obj.target/binding/src/BluetoothHciSocket.o make: g++: Command not found binding.target.mk:94: recipe for target 'Release/obj.target/binding/src/BluetoothHciSocket.o' failed make: *** [Release/obj.target/binding/src/BluetoothHciSocket.o] Error 127 make: Leaving directory '/home/eazyigz/workspace/crestron/locus_bridge_emu_node/node_modules/bluetooth-hci-socket/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:276:23) gyp ERR! stack at emitTwo (events.js:106:13) gyp ERR! stack at ChildProcess.emit (events.js:194:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Linux 4.4.0-59-generic gyp ERR! command "/usr/bin/nodejs" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/eazyigz/workspace/crestron/locus_bridge_emu_node/node_modules/bluetooth-hci-socket gyp ERR! node -v v7.7.2 gyp ERR! node-gyp -v v3.5.0 gyp ERR! not ok npm WARN crestron-locus-emu@0.1.0 No repository field. npm WARN crestron-locus-emu@0.1.0 No license field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@1.2.0 (node_modules/usb): npm WARN optional SKIPPING OPTIONAL DEPENDENCY: usb@1.2.0 install: node-pre-gyp install --fallback-to-build npm WARN optional SKIPPING OPTIONAL DEPENDENCY: Exit status 1 npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! bluetooth-hci-socket@0.5.1 install: node-gyp rebuild npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the bluetooth-hci-socket@0.5.1 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 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 information on how to open an issue for this project with: npm ERR! npm bugs bluetooth-hci-socket npm ERR! Or if that isn't available, 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! A complete log of this run can be found in: npm ERR! /home/eazyigz/.npm/_logs/2017-03-14T18_49_23_334Z-debug.log

sandeepmistry commented 7 years ago

make: g++: Command not found

@IgorGanapolsky you're missing g++ please see: https://github.com/nodejs/node-gyp#installation as per the read me (https://github.com/sandeepmistry/node-bluetooth-hci-socket#prerequisites).