node.js - 安装nodetime时编译出错

标签 node.js compiler-errors

我正在尝试安装 nodetime 模块(用于 Node ),但是当我这样做时,出现以下编译错误:

make: *** [Release/obj.target/nodetime_native/src/nodetime_native.o] Error 1 make: Leaving directory /home/fernando/node_modules/nodetime-native/build' gyp ERR! build error gyp ERR! stack Error:make` failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/home/fernando/apps/node-v0.12.2/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 Linux 3.13.0-53-generic gyp ERR! command "node" "/home/fernando/apps/node-v0.12.2/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/fernando/node_modules/nodetime-native gyp ERR! node -v v0.12.2 gyp ERR! node-gyp -v v1.0.3 gyp ERR! not ok npm ERR! Linux 3.13.0-53-generic npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "i" "nodetime-native" npm ERR! node v0.12.2 npm ERR! npm v2.7.4 npm ERR! code ELIFECYCLE

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



环顾四周,我似乎需要安装 Python,我安装了(2.7 和 3.4)和 make 和 gcc,我安装了。
这里还会发生什么?

最佳答案

您还需要确保通过 PATH 环境变量访问的 Python 可执行文件指向 2.x 版本。

我相信 node-gyp 不适用于 3.x 版本的 Python。

关于node.js - 安装nodetime时编译出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31303123/

相关文章:

python - 为什么我的解析器无法正确理解 “numb=”?

c++ - 为什么逗号表达式用作放置参数时不能按预期工作?

Python 错误 : local variable referenced before assignment

javascript - CouchDB 更新处理程序 : doc update/insert using Nano

javascript - 如何让 React 与 Grunt 和 Babel 一起工作?

JavaScript 数字除法

javascript - webpack-dev-server 不会自动重新加载和构建 - 配置问题