Closed daffychuy closed 3 years ago
I reported this on https://github.com/node-hid/node-hid/issues/175
Hi, I think the problem you are seeing is because the apt pkg libusb-1.0-0-dev
is not installed.
Try doing sudo apt install libusb-1.0-0-dev
and then reinstall your node project.
There is the solution i think, try this sudo ln -s /usr/bin/nodejs /usr/bin/node
, and reinstall again
Hi, I'm trying to install msi-keyboard-cli onto my Ubuntu 16.10 running both latest npm and nodejs, yet I'm still getting errors on install.
`/usr/local/bin/msikeyboard -> /usr/local/lib/node_modules/msi-keyboard-cli/msibacklight
node-pre-gyp ERR! Tried to download(404): https://github.com/node-hid/node-hid/releases/download/0.5.2/HID-v0.5.2-node-v51-linux-x64.tar.gz node-pre-gyp ERR! Pre-built binaries not found for node-hid@0.5.2 and node@7.3.0 (node-v51 ABI) (falling back to source compile with node-gyp) gyp WARN EACCES user "root" does not have permission to access the dev dir "/root/.node-gyp/7.3.0" gyp WARN EACCES attempting to reinstall using temporary dev dir "/usr/local/lib/node_modules/msi-keyboard-cli/node_modules/node-hid/.node-gyp" make: Entering directory '/usr/local/lib/node_modules/msi-keyboard-cli/node_modules/node-hid/build' make: *** No rule to make target '../.node-gyp/7.3.0/include/node/common.gypi', needed by 'Makefile'. Stop. make: Leaving directory '/usr/local/lib/node_modules/msi-keyboard-cli/node_modules/node-hid/build' gyp ERR! build error gyp ERR! stack Error: (/usr/local/lib/node_modules/msi-keyboard-cli/node_modules/node-hid/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:191:7)
node-pre-gyp ERR! stack at maybeClose (internal/child_process.js:885:16)
node-pre-gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
node-pre-gyp ERR! System Linux 4.8.0-32-generic
node-pre-gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/msi-keyboard-cli/node_modules/node-hid/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
node-pre-gyp ERR! cwd /usr/local/lib/node_modules/msi-keyboard-cli/node_modules/node-hid
node-pre-gyp ERR! node -v v7.3.0
node-pre-gyp ERR! node-pre-gyp -v v0.6.31
node-pre-gyp ERR! not ok
Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/msi-keyboard-cli/node_modules/node-hid/build/HID/Release/HID.node --module_name=HID --module_path=/usr/local/lib/node_modules/msi-keyboard-cli/node_modules/node-hid/build/HID/Release' (1)
/usr/local/lib
└── (empty)
make
failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/usr/local/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:191:7) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12) gyp ERR! System Linux 4.8.0-32-generic gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/usr/local/lib/node_modules/msi-keyboard-cli/node_modules/node-hid/build/HID/Release/HID.node" "--module_name=HID" "--module_path=/usr/local/lib/node_modules/msi-keyboard-cli/node_modules/node-hid/build/HID/Release" gyp ERR! cwd /usr/local/lib/node_modules/msi-keyboard-cli/node_modules/node-hid gyp ERR! node -v v7.3.0 gyp ERR! node-gyp -v v3.4.0 gyp ERR! not ok node-pre-gyp ERR! build error node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/usr/local/lib/node_modules/msi-keyboard-cli/node_modules/node-hid/build/HID/Release/HID.node --module_name=HID --module_path=/usr/local/lib/node_modules/msi-keyboard-cli/node_modules/node-hid/build/HID/Release' (1) node-pre-gyp ERR! stack at ChildProcess.npm ERR! Linux 4.8.0-32-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "msi-keyboard-cli" "-g" npm ERR! node v7.3.0 npm ERR! npm v4.0.5 npm ERR! code ELIFECYCLE
npm ERR! node-hid@0.5.2 install:
node-pre-gyp install --fallback-to-build
npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-hid@0.5.2 install script 'node-pre-gyp install --fallback-to-build'. 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 node-hid package, npm ERR! not with npm itself. npm ERR! Tell the author that this fails on your system: npm ERR! node-pre-gyp install --fallback-to-build npm ERR! You can get information on how to open an issue for this project with: npm ERR! npm bugs node-hid npm ERR! Or if that isn't available, you can get their info via: npm ERR! npm owner ls node-hid npm ERR! There is likely additional logging output above. `And link to debug of npm: https://paste.ee/p/xv0Wc