javascript - Node 中无法安装软件包

标签 javascript node.js npm raspberry-pi raspbian

我正在尝试设置 raspberry pi 3。我想安装并运行 Node 代码,但在使用 npm 安装软件包时遇到问题。

我尝试了几个版本的 Node (包括最新的armhf和一个较旧的),但我总是得到以下错误(安装groove [npm install groove]

groove@2.5.1 install /home/pi/node_modules/groove  node-gyp rebuild

make: Entering directory '/home/pi/node_modules/groove/build'   CXX(target) Release/obj.target/groove/src/groove.o In file included from ../src/groove.cc:4:0: ../src/file.h:6:27: fatal error: groove/groove.h: Aucun fichier ou dossier de ce type  #include <groove/groove.h>
                           ^ compilation terminated. groove.target.mk:95: recipe for target 'Release/obj.target/groove/src/groove.o' failed make: *** [Release/obj.target/groove/src/groove.o] Error 1 make: Leaving directory '/home/pi/node_modules/groove/build' gyp ERR! build error  gyp ERR! stack Error: `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:270:23) gyp ERR! stack     at emitTwo (events.js:87:13) gyp ERR! stack     at ChildProcess.emit (events.js:172:7) gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12) gyp ERR! System Linux 4.4.50-v7+ gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/pi/node_modules/groove gyp ERR! node -v v4.2.1 gyp ERR! node-gyp -v v3.0.3 gyp ERR! not ok  npm ERR! Linux
4.4.50-v7+ npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "groove" npm ERR! node v4.2.1 npm ERR! npm  v2.14.7 npm ERR! code ELIFECYCLE

npm ERR! groove@2.5.1 install: `node-gyp rebuild` npm ERR! Exit status 1 npm ERR!  npm ERR! Failed at the groove@2.5.1 install script 'node-gyp rebuild'. npm ERR! This is most likely a problem with the groove 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 groove npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request: npm ERR!     /home/pi/npm-debug.log

npm-debug.log 如下: http://pastebin.com/M5jRwiFX

谢谢你的帮助

最佳答案

您缺少 groove/groove.h 尝试安装 libgroove-dev

关于javascript - Node 中无法安装软件包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42594437/

相关文章:

node.js - 在发送给客户端之前劫持响应

javascript - cdnjs 和 npm 有什么区别?

eclipse - 如何将 Github 存储库导入 Nodeclipse (Enide)?

javascript - 使用对象构建 Mocha 测试

node.js - 尽管安装了所有要求,但无法获取 Angular CLI 版本?

javascript - 如何在本地构建和使用 xterm.js?

javascript - 拖放并更改dom中div的父级

javascript - <使用> - SVG : Stroke of Circle overriding stroke of use element

javascript - JavaScript 中的事件处理程序是否按顺序调用?

javascript - 如何处理Express API中的多个错误?例如我要处理404,405,400和500