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

当我尝试在websocket中安装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上出现同样的错误。 这篇文章是有帮助的。 我试着用npm install websocket@1.3.3,它工作。