无法在 Windows Server 2012 上安装 socket.io [英] Not able to install socket.io on Windows server 2012

查看:59
本文介绍了无法在 Windows Server 2012 上安装 socket.io的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 windows server 2012 上安装 Socket.io

I am trying to install Socket.io on windows server 2012

npm install socket.io

我得到的错误是

MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe".
 To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visua
l Studio 2005 or 3) add the location of the component to the system path if it
is installed elsewhere.  [D:\PushNotificationServer\node_modules\socket.io\node
_modules\socket.io-client\node_modules\ws\build\binding.sln]
MSBUILD : error MSB3428: Could not load the Visual C++ component "VCBuild.exe".
 To fix this, 1) install the .NET Framework 2.0 SDK, 2) install Microsoft Visua
l Studio 2005 or 3) add the location of the component to the system path if it
is installed elsewhere.  [D:\PushNotificationServer\node_modules\socket.io\node
_modules\socket.io-client\node_modules\ws\build\binding.sln]
socket.io@0.9.6 node_modules\socket.io
├── policyfile@0.0.4
├── redis@0.6.7
└── socket.io-client@0.9.6 (xmlhttprequest@1.2.2, uglify-js@1.2.5, active-x-obfu
scator@0.0.1, ws@0.4.31)

我已经安装了 framework 2.0,但是我是否必须购买 Visual Studio 2005 的许可证才能安装在服务器上?还是真的有必要安装?或者是否有其他服务器版本的编译器?

I've installed the framework 2.0 but do I have to buy a licence for visual studio 2005 to install on server? Or is there really a need to install it? Or is there some alternative compiler for server editions?

我的问题背后的原因是在 Windows Server 2008 上完成的相同设置不会引发任何错误.我没有在 windows server 2008 上安装任何特殊的东西.问题仅在 Server 2012 上.可能的出路是什么?

The reason behind my question is that the same setup done on windows server 2008 does not throw any error. I did not install anything special on windows server 2008. The problem is with Server 2012 only. What could be the possible way out?

推荐答案

我找到的唯一解决方案:

----不要在服务器上编译二进制文件,而是在本地系统上编译.

在本地系统上安装所有二进制文件,如 Socket.ioexpressconnect.确保所有必需的二进制文件都已编译并加载到 node_modules 文件夹中.

Install all the binaries like Socket.io, express and connect on your local system. Make sure that all required binaries are compiled and loaded into node_modules folder.

只需通过 FTP FTP 服务器上的该文件夹即可.(确保服务器上安装了 python 2.7)

Simply FTP that folder on your server. (Make sure that python 2.7 is installed on server)

运行

node server.js //or yourFile.js

这应该可以正常工作.

这篇关于无法在 Windows Server 2012 上安装 socket.io的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆