无法正确安装环回...C++错误

can't get loopback to install correctly...C++ error

本文关键字:C++ 错误 安装      更新时间:2023-10-16

我正在尝试按照本指南在windows上安装循环。

http://docs.strongloop.com/display/SL/Installing+Node+and+StrongLoop+on+Windows

我已经安装了Python 2.7.1 x64, nodejs 64和c++ runtime 2013 64 &32. 重新启动我的电脑。然后当我运行

npm install -g strongloop

我得到了这个:

Copyright (c) 2009 Microsoft Corporation.  All rights reserved.
C:Usersronak.patel>npm install -g strongloop
npm WARN optional dep failed, continuing strong-fork-syslog@1.2.3
/

> heapdump@0.3.6 install C:Usersronak.patelAppDataRoamingnpmnode_moduless
trongloopnode_modulesstrong-supervisornode_modulesheapdump
> node-gyp rebuild

C:Usersronak.patelAppDataRoamingnpmnode_modulesstrongloopnode_modulesst
rong-supervisornode_modulesheapdump>if not defined npm_config_node_gyp (node "
C:Program Filesnodejsnode_modulesnpmbinnode-gyp-bin\....node_modulesno
de-gypbinnode-gyp.js" rebuild )  else (node  rebuild )
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
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.  [C:Usersronak.patelAppDataRoamingnpmnode_modules
strongloopnode_modulesstrong-supervisornode_modulesheapdumpbuildbinding.
sln]
gyp ERR! build error
gyp ERR! stack Error: `C:WindowsMicrosoft.NETFrameworkv4.0.30319msbuild.exe
` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:Program Filesnodejsnode_modules
npmnode_modulesnode-gyplibbuild.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 Windows_NT 6.1.7601
gyp ERR! command "node" "C:\Program Files\nodejs\node_modules\npm\node_modu
les\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:Usersronak.patelAppDataRoamingnpmnode_modulesstrongloopno
de_modulesstrong-supervisornode_modulesheapdump
gyp ERR! node -v v0.12.7
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok

> bufferutil@1.1.0 install C:Usersronak.patelAppDataRoamingnpmnode_modules
strongloopnode_moduleswsnode_modulesbufferutil
> node-gyp rebuild
-
C:Usersronak.patelAppDataRoamingnpmnode_modulesstrongloopnode_modulesws
node_modulesbufferutil>if not defined npm_config_node_gyp (node "C:Program Fi
lesnodejsnode_modulesnpmbinnode-gyp-bin\....node_modulesnode-gypbinno
de-gyp.js" rebuild )  else (node  rebuild )
^CTerminate batch job (Y/N)? y

heapdump(和bufferutil)在这种情况下实际上是可选的依赖项,所以如果它们不编译/安装,那么模块(strongloop)仍然会被安装并且应该正常工作。

然而,如果你想确保可选的依赖被构建/安装,你需要安装的不仅仅是c++运行时。您至少需要安装Visual Studio Express(2012或可能更新,但2012应该可以肯定地工作)来获得编译器,头文件等所需的插件。