试图通过npm在NodeJS中安装websocket模块时出错



当我试图在NodeJS中安装websocket模块时,我得到了以下错误。我正在试用Ubuntu 12.04的机器。

ubuntu@domU-12-31-39-14-1A-A1:/var/www$ npm install websocket
npm http GET https://registry.npmjs.org/websocket
npm http 304 https://registry.npmjs.org/websocket
> websocket@1.0.8 install /var/www/node_modules/websocket
> node install.js
[websocket v1.0.8] Attempting to compile native extensions.
[websocket v1.0.8]
Native code compile failed!!
Please note that this module DOES NOT REQUIRE the native components
and will still work without them, though not quite as efficiently.
On Windows, native extensions require Visual Studio and Python.
On Unix, native extensions require Python, make and a C++ compiler.
Start npm with --websocket:verbose to show compilation output (if any).
websocket@1.0.8 node_modules/websocket

安装websocket模块时使用的命令是npm install websocket。谁能告诉我出了什么问题吗?

检查是否安装了python和make。我没有在Ubuntu上这样做,但在Windows7上出现了同样的错误。这篇文章很有帮助。

相关内容

  • 没有找到相关文章

最新更新