【问题标题】:How to install npm install xbox-controller in ubuntu?如何在 ubuntu 中安装 npm install xbox-controller?
【发布时间】:2015-05-06 10:28:16
【问题描述】:

我使用 johnny-5 用按钮闪烁 LED。我想用 xBox pad 的按钮闪烁它,所以我找到了 npm xbox-controller 但我无法在 Ubuntu 14.04 中安装它。我收到此错误:

**compilation terminated.
make: *** [Release/obj.target/hidapi/hidapi/libusb/hid.o] Error 1
make: Leaving directory `/home/villalpando/xbox/node_modules/node-hid/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:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
gyp ERR! System Linux 3.16.0-37-generic
gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" "install"
gyp ERR! cwd /home/villalpando/xbox/node_modules/node-hid
gyp ERR! node -v v0.10.38
gyp ERR! node-gyp -v v1.0.3
gyp ERR! not ok 
npm ERR! Linux 3.16.0-37-generic
npm ERR! argv "node" "/usr/bin/npm" "install" "node-hid"
npm ERR! node v0.10.38
npm ERR! npm  v2.9.0
npm ERR! code ELIFECYCLE
npm ERR! node-hid@0.3.2 install: `sh install.sh`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the node-hid@0.3.2 install script 'sh install.sh'.
npm ERR! 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!     sh install.sh
npm ERR! You can get their info via:
npm ERR!     npm owner ls node-hid
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR!     /home/villalpando/xbox/npm-debug.log**

还有其他方法吗?

【问题讨论】:

    标签: linux node.js bash ubuntu


    【解决方案1】:

    我在这里找到了答案 http://www.codeitive.com/0zzejPjkVg/npm-fail-to-install-nodehid-faild-to-install-last-version-of-nodejs.html 看来我的 node.js 太旧了,无法支持 node-hid 谢谢

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-07-21
      • 1970-01-01
      • 1970-01-01
      • 2019-05-02
      • 2017-04-20
      相关资源
      最近更新 更多