【发布时间】:2014-02-16 04:04:21
【问题描述】:
我正在尝试安装https://www.npmjs.org/package/sails-mongo,它得到的是 0.9.6 而不是 0.9.7(作为最新版本)。我在 Windows 7 上有最新的 node.js (0.10.25 64-bit) 和 mongodb (2.4.9 64-bit)。
C:\my_project\backend>npm install sails-mongo
无论如何,我遇到了致命错误:
npm http GET https://registry.npmjs.org/sails-mongo/0.9.6
npm http 304 https://registry.npmjs.org/sails-mongo/0.9.6
npm http GET https://registry.npmjs.org/underscore/1.4.4
npm http GET https://registry.npmjs.org/underscore.string/2.3.1
npm http GET https://registry.npmjs.org/async/0.2.9
npm http GET https://registry.npmjs.org/mongodb
npm http 304 https://registry.npmjs.org/underscore/1.4.4
npm http 304 https://registry.npmjs.org/underscore.string/2.3.1
npm http 304 https://registry.npmjs.org/async/0.2.9
npm http 304 https://registry.npmjs.org/mongodb
npm http GET https://registry.npmjs.org/bson/0.2.5
npm http GET https://registry.npmjs.org/kerberos/0.0.3
npm http 304 https://registry.npmjs.org/bson/0.2.5
npm http 304 https://registry.npmjs.org/kerberos/0.0.3
> kerberos@0.0.3 install C:\my_project\backend\node_modules\sails-mongo\node_modules\m
ongodb\node_modules\kerberos
> (node-gyp rebuild 2> builderror.log) || (exit 0)
C:\my_project\backend\node_modules\sails-mongo\node_modules\mongodb\node_modules\kerbe
ros>node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_
modules\node-gyp\bin\node-gyp.js" rebuild
kerberos.cc
worker.cc
security_credentials.cc
security_buffer.cc
security_buffer_descriptor.cc
security_context.cc
C:\Users\myname\.node-gyp\0.10.25\deps\v8\include\v8.h(179): warning C4506: no
definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::H
andle<T>)' [C:\my_project\backend\node_modules\sails-mongo\node_modules\mongodb\node_
modules\kerberos\build\kerberos.vcxproj]
with
[
T=v8::Object
]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): wa
rning C4530: C++ exception handler used, but unwind semantics are not enabled.
Specify /EHsc [C:\my_project\backend\node_modules\sails-mongo\node_modules\mongodb\no
de_modules\kerberos\build\kerberos.vcxproj]
C:\Users\myname\.node-gyp\0.10.25\deps\v8\include\v8.h(184): warning C4506: no
definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::H
andle<T>)' [C:\my_project\backend\node_modules\sails-mongo\node_modules\mongodb\node_
modules\kerberos\build\kerberos.vcxproj]
with
[
T=v8::Object
]
C:\Users\myname\.node-gyp\0.10.25\deps\v8\include\v8.h(184): warning C4506: no
definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::H
andle<T>)' [C:\my_project\backend\node_modules\sails-mongo\node_modules\mongodb\node_
modules\kerberos\build\kerberos.vcxproj]
with
[
T=v8::FunctionTemplate
]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): wa
rning C4530: C++ exception handler used, but unwind semantics are not enabled.
Specify /EHsc [C:\my_project\backend\node_modules\sails-mongo\node_modules\mongodb\no
de_modules\kerberos\build\kerberos.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): wa
rning C4530: C++ exception handler used, but unwind semantics are not enabled.
Specify /EHsc [C:\my_project\backend\node_modules\sails-mongo\node_modules\mongodb\no
de_modules\kerberos\build\kerberos.vcxproj]
C:\Users\myname\.node-gyp\0.10.25\deps\v8\include\v8.h(179): warning C4506: no
definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::H
andle<T>)' [C:\my_project\backend\node_modules\sails-mongo\node_modules\mongodb\node_
modules\kerberos\build\kerberos.vcxproj]
with
[
T=v8::Object
]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): wa
rning C4530: C++ exception handler used, but unwind semantics are not enabled.
Specify /EHsc [C:\my_project\backend\node_modules\sails-mongo\node_modules\mongodb\no
de_modules\kerberos\build\kerberos.vcxproj]
C:\Users\myname\.node-gyp\0.10.25\deps\v8\include\v8.h(179): warning C4506: no
definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::H
andle<T>)' [C:\my_project\backend\node_modules\sails-mongo\node_modules\mongodb\node_
modules\kerberos\build\kerberos.vcxproj]
with
[
T=v8::FunctionTemplate
]
C:\Users\myname\.node-gyp\0.10.25\deps\v8\include\v8.h(218): warning C4506: no
definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::H
andle<T>)' [C:\my_project\backend\node_modules\sails-mongo\node_modules\mongodb\node_
modules\kerberos\build\kerberos.vcxproj]
with
[
T=v8::Object
]
C:\Users\myname\.node-gyp\0.10.25\deps\v8\include\v8.h(218): warning C4506: no
definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::H
andle<T>)' [C:\my_project\backend\node_modules\sails-mongo\node_modules\mongodb\node_
modules\kerberos\build\kerberos.vcxproj]
with
[
T=v8::FunctionTemplate
]
C:\Users\myname\.node-gyp\0.10.25\deps\v8\include\v8.h(218): warning C4506: no
definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::H
andle<T>)' [C:\my_project\backend\node_modules\sails-mongo\node_modules\mongodb\node_
modules\kerberos\build\kerberos.vcxproj]
with
[
T=v8::Object
]
C:\Users\myname\.node-gyp\0.10.25\deps\v8\include\v8.h(218): warning C4506: no
definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::H
andle<T>)' [C:\my_project\backend\node_modules\sails-mongo\node_modules\mongodb\node_
modules\kerberos\build\kerberos.vcxproj]
with
[
T=v8::FunctionTemplate
]
C:\Users\myname\.node-gyp\0.10.25\deps\v8\include\v8.h(179): warning C4506: no
definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::H
andle<T>)' [C:\my_project\backend\node_modules\sails-mongo\node_modules\mongodb\node_
modules\kerberos\build\kerberos.vcxproj]
with
[
T=v8::Object
]
C:\Users\myname\.node-gyp\0.10.25\deps\v8\include\v8.h(179): warning C4506: no
definition for inline function 'v8::Persistent<T> v8::Persistent<T>::New(v8::H
andle<T>)' [C:\my_project\backend\node_modules\sails-mongo\node_modules\mongodb\node_
modules\kerberos\build\kerberos.vcxproj]
with
[
T=v8::FunctionTemplate
]
kerberos_sspi.c
base64.c
LINK : fatal error LNK1181: cannot open input file 'kernel32.lib' [C:\my_project\back
end\node_modules\sails-mongo\node_modules\mongodb\node_modules\kerberos\build\k
erberos.vcxproj]
> bson@0.2.5 install C:\my_project\backend\node_modules\sails-mongo\node_modules\mongo
db\node_modules\bson
> (node-gyp rebuild 2> builderror.log) || (exit 0)
C:\my_project\backend\node_modules\sails-mongo\node_modules\mongodb\node_modules\bson>
node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modu
les\node-gyp\bin\node-gyp.js" rebuild
bson.cc
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): wa
rning C4530: C++ exception handler used, but unwind semantics are not enabled.
Specify /EHsc [C:\my_project\backend\node_modules\sails-mongo\node_modules\mongodb\no
de_modules\bson\build\bson.vcxproj]
C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\intrin.h(26): fa
tal error C1083: Cannot open include file: 'ammintrin.h': No such file or direc
tory [C:\my_project\backend\node_modules\sails-mongo\node_modules\mongodb\node_module
s\bson\build\bson.vcxproj]
sails-mongo@0.9.6 node_modules\sails-mongo
├── async@0.2.9
├── underscore@1.4.4
├── underscore.string@2.3.1
└── mongodb@1.3.23 (kerberos@0.0.3, bson@0.2.5)
这里是为了让您更轻松:
LINK : fatal error LNK1181: cannot open input file 'kernel32.lib' [C:\my_project\back
end\node_modules\sails-mongo\node_modules\mongodb\node_modules\kerberos\build\k
erberos.vcxproj]
知道为什么吗?以及如何解决这个问题?
更新 1:
我关注了这篇文章http://blogs.msdn.com/b/saurabh_singh/archive/2009/01/30/getting-fatal-error-lnk1181-cannot-open-input-file-kernel32-lib.aspx,它似乎解决了一个问题,现在我得到了不同的错误:
npm http GET https://registry.npmjs.org/sails-mongo/0.9.6
npm http 304 https://registry.npmjs.org/sails-mongo/0.9.6
npm http GET https://registry.npmjs.org/async/0.2.9
npm http GET https://registry.npmjs.org/underscore/1.4.4
npm http GET https://registry.npmjs.org/underscore.string/2.3.1
npm http GET https://registry.npmjs.org/mongodb
npm http 304 https://registry.npmjs.org/async/0.2.9
npm http 304 https://registry.npmjs.org/underscore/1.4.4
npm http 304 https://registry.npmjs.org/mongodb
npm http 304 https://registry.npmjs.org/underscore.string/2.3.1
npm http GET https://registry.npmjs.org/bson/0.2.5
npm http 304 https://registry.npmjs.org/bson/0.2.5
> bson@0.2.5 install c:\my_project\backend\node_modules\sails-mongo\node_modules\mongo
db\node_modules\bson
> (node-gyp rebuild 2> builderror.log) || (exit 0)
c:\my_project\backend\node_modules\sails-mongo\node_modules\mongodb\node_modules\bson>
node "C:\Program Files\nodejs\node_modules\npm\bin\node-gyp-bin\\..\..\node_modu
les\node-gyp\bin\node-gyp.js" rebuild
Building the projects in this solution one at a time. To enable parallel build,
please add the "/m" switch.
bson.cc
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xlocale(323): wa
rning C4530: C++ exception handler used, but unwind semantics are not enabled.
Specify /EHsc [c:\my_project\backend\node_modules\sails-mongo\node_modules\mongodb\no
de_modules\bson\build\bson.vcxproj]
c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\intrin.h(26): fa
tal error C1083: Cannot open include file: 'ammintrin.h': No such file or direc
tory [c:\my_project\backend\node_modules\sails-mongo\node_modules\mongodb\node_module
s\bson\build\bson.vcxproj]
sails-mongo@0.9.6 node_modules\sails-mongo
├── underscore@1.4.4
├── async@0.2.9
├── underscore.string@2.3.1
└── mongodb@1.3.23 (bson@0.2.5)
【问题讨论】:
-
为什么不在
kerberos模块的github问题页面中发布呢? -
我不觉得这是
sails-mongo的问题。这是我的事。 -
我相信这不是你的错。看起来它试图编译 32 位版本的 kerberos,而您的机器上只安装了 64 位版本的 kerberos。不过我不太确定。
标签: javascript node.js mongodb sails.js