我正在嘗試安裝https://www.npmjs.org/package/sails-mongo,它取得了0.9.6而不是0.9.7(作爲最新版本)。我有最新的的node.js(0.10.25 64位)和的MongoDB(2.4.9 64位)在Windows 7在Windows 7上安裝sails-mongo時發生致命錯誤
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
> [email protected] 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]
> [email protected] 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]
[email protected] node_modules\sails-mongo
├── [email protected]
├── [email protected]
├── [email protected]
└── [email protected] ([email protected], [email protected])
它在這裏,使你更容易:
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
> [email protected] 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]
[email protected] node_modules\sails-mongo
├── [email protected]
├── [email protected]
├── [email protected]
└── mongo[email protected] ([email protected])
你爲什麼不張貼在'kerberos'模塊的GitHub的問題頁面? – thefourtheye
我不覺得這是'sails-mongo'問題。這是我的目標。 –
我相信它不是你的錯。看起來它試圖編譯32位版本的kerberos,而你的機器上只安裝了64位版本的kerberos。但我不太確定。 – thefourtheye