无法安装mongoose npm

时间:2015-10-15 04:48:34

标签: node.js mongodb mongoose npm

我正在安装mongoose作为npm。我收回了一堆错误。我从一篇关于类似问题的文章中做了一个npm install npm install -g node-gyp 。但是,我的问题似乎没有消失。我无法解决这个问题的警告。任何见解都会非常感激。

   ../lib/kerberosgss.c:509:13: warning: implicit declaration of function 'gss_acquire_cred_impersonate_name' is invalid in C99
      [-Wimplicit-function-declaration]
        maj_stat = gss_acquire_cred_impersonate_name(&min_stat,
                   ^
1 warning generated.
  CC(target) Release/obj.target/kerberos/lib/base64.o
  CXX(target) Release/obj.target/kerberos/lib/kerberos_context.o
  SOLINK_MODULE(target) Release/kerberos.node
ld: library not found for -lgcc_s.10.5
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/kerberos.node] Error 1
gyp ERR! build error 
gyp ERR! stack Error: `make` failed with exit code: 2
gyp ERR! stack     at ChildProcess.onExit (/Users/stevenkauyedauty/.npm-packages/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:269:23)
gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:810:12)
gyp ERR! System Darwin 14.5.0
gyp ERR! command "node" "/Users/stevenkauyedauty/.npm-packages/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /Users/stevenkauyedauty/projects/controllerAs/beerRecipes/node_modules/mongoose/node_modules/mongodb/node_modules/mongodb-core/node_modules/kerberos
gyp ERR! node -v v0.10.33
gyp ERR! node-gyp -v v2.0.1
gyp ERR! not ok 

1 个答案:

答案 0 :(得分:2)

抱怨您的系统上没有库lgcc_s.10.5。您可以在Homebrew here中看到类似的问题。如果您使用的是Mac,那么建议的解决方案是升级到XCode 7。

找出您的XCode版本:

vinay@chocobo-2:~ $ xcodebuild -version
Xcode 7.0.1