How do I install websocket module for Node.js on Debian VPS?

Posted by Ollie Shaw on Stack Overflow See other posts from Stack Overflow or by Ollie Shaw
Published on 2012-09-12T02:30:12Z Indexed on 2012/10/15 3:38 UTC
Read the original article Hit count: 237

Filed under:
|
|
|

I currently am renting a VPS from Dreamhost which runs Debian. I am still learning command line on this OS, but fast!

I have successfully installed Node.js, now I want to install the websocket module found here: https://github.com/Worlize/WebSocket-Node

From the root user, I have run the following command:

 npm install websocket

The error thrown is:

[websocket v1.0.7]

Native code compile failed!!

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).

What commands should I issue to install this websocket module and its requirements?

Thanks very much!

Edit: When I run sudo apt-get install gcc make

I get this message:

Reading package lists... Done Building dependency tree Reading state information... Done gcc is already the newest version. gcc set to manually installed. make is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 44 not upgraded.

And the same error when trying to install WebSocket.

© Stack Overflow or respective owner

Related posts about node.js

Related posts about websocket