node.js - 当我 sudo npm install exec-sync 发生时

标签 node.js npm node-gyp

版本信息

node-gyp : v2.0.2

npm : v2.13.4

node : v0.12.7

当我 sudo npm install exec-sync 发生时

$ sudo npm install exec-sync

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:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:110:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:1074:12)
gyp ERR! System Darwin 14.4.0
gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/Nealkim/Work/dev/src/TobeSmart/node_modules/exec-sync/node_modules/ffi
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok 
npm ERR! Darwin 14.4.0
npm ERR! argv "node" "/usr/local/bin/npm" "i" "exec-sync"
npm ERR! node v0.12.7
npm ERR! npm  v2.11.3
npm ERR! code ELIFECYCLE

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

npm ERR! Please include the following file with any support request:
npm ERR!     /Users/Nealkim/Work/dev/src/TobeSmart/npm-debug.log

最佳答案

我在 ubuntu 上通过执行 apt-get install 对此进行了排序:

apt-get install node-gyp

关于node.js - 当我 sudo npm install exec-sync 发生时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31947617/

相关文章:

npm - 端口 4200 已被使用。使用 '--port' 指定不同的端口

node-gyp - appveyor - 如何使用 %HOMEPATH% 设置环境变量

node.js - 使用 node-gyp 交叉编译具有 native 绑定(bind)的 Node 模块

vue.js - npm runserve 和 npm run build 的不同 vue.config.js

npm - 我不断从 npm 获取 `errno 4058`

node.js - 尝试构建遗留 Node/Angular/ ionic 应用程序,在node-gyp命令上失败

node.js - 在MongoDB中更新和返回文档

node.js - 在 sails 中使用forever时出错

node.js - 使用 dockerfile 构建时出现 "can' t cd"错误

javascript - 如何告诉 Passport JS 中的 typescript req.user 永远不会被定义?