如何使用npm在Windows 7 64位上安装couchbase节点模块?

时间:2013-05-02 08:26:06

标签: node.js npm couchbase

我正在尝试在我的计算机上安装couchbase(Win 7 64位)。在使用npm安装尝试期间,我收到以下错误。

有谁能告诉我如何进行安装?

命令提示符

npm错误

D:\R and D\Cache_RND_Node>npm install couchbase 
npm http GET http://registry.npmjs.org/couchbase
npm http 304 http://registry.npmjs.org/couchbase
npm http GET http://registry.npmjs.org/bindings
npm http 304 http://registry.npmjs.org/bindings

> couchbase@0.0.12 install D:\R and D\Cache_RND_Node\node_modules\couchbase
> node-gyp rebuild    

D:\R and D\Cache_RND_Node\node_modules\couchbase>node "C:\Program Files\nodejs\node_modules\npm\bin\
node-gyp-bin\\..\..\node_modules\node-gyp\bin\node-gyp.js" rebuild
Warning: Missing input files:
C:\couchbase\lib\libcouchbase.dll
  Copying C:/couchbase/lib/libcouchbase.dll to D:\R and D\Cache_RND_Node\node_modules\couchbase/bui
  ld/Release/libcouchbase.dll
  The system cannot find the path specified.
  cas.cc
  operations.cc
  notify.cc
  couchbase_impl.cc
d:\r and d\cache_rnd_node\node_modules\couchbase\src\couchbase_impl.h(52): fatal error C1083: Canno
t open include file: 'libcouchbase/couchbase.h': No such file or directory [D:\R and D\Cache_RND_No
de\node_modules\couchbase\build\couchbase_impl.vcxproj]
d:\r and d\cache_rnd_node\node_modules\couchbase\src\couchbase_impl.h(52): fatal error C1083: Canno
t open include file: 'libcouchbase/couchbase.h': No such file or directory [D:\R and D\Cache_RND_No
de\node_modules\couchbase\build\couchbase_impl.vcxproj]
d:\r and d\cache_rnd_node\node_modules\couchbase\src\couchbase_impl.h(52): fatal error C1083: Canno
t open include file: 'libcouchbase/couchbase.h': No such file or directory [D:\R and D\Cache_RND_No
de\node_modules\couchbase\build\couchbase_impl.vcxproj]
  ioplugin.cc
  namemap.cc
d:\r and d\cache_rnd_node\node_modules\couchbase\src\couchbase_impl.h(52): fatal error C1083: Canno
t open include file: 'libcouchbase/couchbase.h': No such file or directory [D:\R and D\Cache_RND_No
de\node_modules\couchbase\build\couchbase_impl.vcxproj]
..\src\ioplugin.cc(17): fatal error C1083: Cannot open include file: 'libcouchbase/couchbase.h': No
 such file or directory [D:\R and D\Cache_RND_Node\node_modules\couchbase\build\couchbase_impl.vcxp
roj]
d:\r and d\cache_rnd_node\node_modules\couchbase\src\couchbase_impl.h(52): fatal error C1083: Canno
t open include file: 'libcouchbase/couchbase.h': No such file or directory [D:\R and D\Cache_RND_No
de\node_modules\couchbase\build\couchbase_impl.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe` failed with exit
 code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\nod
e-gyp\lib\build.js:256:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:754:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Program Files\\nodejs\\node_modules\\npm\\node_modules\\node-gyp\\bin\\
node-gyp.js" "rebuild"
gyp ERR! cwd D:\R and D\Cache_RND_Node\node_modules\couchbase
gyp ERR! node -v v0.10.0
gyp ERR! node-gyp -v v0.8.5
gyp ERR! not ok
npm ERR! couchbase@0.0.12 install: `node-gyp rebuild`
npm ERR! `cmd "/c" "node-gyp rebuild"` failed with 1
npm ERR!
npm ERR! Failed at the couchbase@0.0.12 install script.
npm ERR! This is most likely a problem with the couchbase package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get their info via:
npm ERR!     npm owner ls couchbase
npm ERR! There is likely additional logging output above.

npm ERR! System Windows_NT 6.1.7601
npm ERR! command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\n
pm\\bin\\npm-cli.js" "install" "couchbase"
npm ERR! cwd D:\R and D\Cache_RND_Node
npm ERR! node -v v0.10.0
npm ERR! npm -v 1.2.14
npm ERR! code ELIFECYCLE
npm ERR!
npm ERR! Additional logging details can be found in:
npm ERR!     D:\R and D\Cache_RND_Node\npm-debug.log
npm ERR! not ok code 0

npm-debug.log文件包含以下内容:

0 info it worked if it ends with ok
1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
1 verbose cli   'install',
1 verbose cli   'couchbase' ]
2 info using npm@1.2.14
3 info using node@v0.10.0
4 verbose node symlink C:\Program Files\nodejs\\node.exe
5 verbose read json D:\R and D\Cache_RND_Node\package.json
6 warn package.json RestAPIs@0.1.0 No README.md file found!
7 verbose read json D:\R and D\Cache_RND_Node\node_modules\moment\package.json
8 verbose read json D:\R and D\Cache_RND_Node\node_modules\mongodb\package.json
9 verbose read json D:\R and D\Cache_RND_Node\node_modules\restify\package.json
....
.
.
.
....
195 silly resolved     _id: 'bindings@1.0.0',
195 silly resolved     _from: 'bindings@~1.0.0' } ]
196 info install bindings@1.0.0 into D:\R and D\Cache_RND_Node\node_modules\couchbase
197 info installOne bindings@1.0.0
198 verbose from cache C:\Users\Amol.Kulkarni\AppData\Roaming\npm-cache\bindings\1.0.0\package\package.json
199 info D:\R and D\Cache_RND_Node\node_modules\couchbase\node_modules\bindings unbuild
200 verbose read json D:\R and D\Cache_RND_Node\node_modules\couchbase\node_modules\bindings\package.json
201 verbose tar unpack C:\Users\Amol.Kulkarni\AppData\Roaming\npm-cache\bindings\1.0.0\package.tgz
202 silly lockFile f7d0abcf--couchbase-node-modules-bindings D:\R and D\Cache_RND_Node\node_modules\couchbase\node_modules\bindings
203 verbose lock D:\R and D\Cache_RND_Node\node_modules\couchbase\node_modules\bindings C:\Users\Amol.Kulkarni\AppData\Roaming\npm-cache\f7d0abcf--couchbase-node-modules-bindings.lock
204 silly lockFile 1f615ec5-cache-bindings-1-0-0-package-tgz C:\Users\Amol.Kulkarni\AppData\Roaming\npm-cache\bindings\1.0.0\package.tgz
205 verbose lock C:\Users\Amol.Kulkarni\AppData\Roaming\npm-cache\bindings\1.0.0\package.tgz C:\Users\Amol.Kulkarni\AppData\Roaming\npm-cache\1f615ec5-cache-bindings-1-0-0-package-tgz.lock
206 silly gunzTarPerm modes [ '755', '644' ]
207 silly gunzTarPerm extractEntry package.json
208 silly gunzTarPerm modified mode [ 'package.json', 438, 420 ]
209 silly gunzTarPerm extractEntry README.md
210 silly gunzTarPerm modified mode [ 'README.md', 438, 420 ]
211 silly gunzTarPerm extractEntry bindings.js
212 silly gunzTarPerm modified mode [ 'bindings.js', 438, 420 ]
213 verbose read json D:\R and D\Cache_RND_Node\node_modules\couchbase\node_modules\bindings\package.json
214 silly lockFile f7d0abcf--couchbase-node-modules-bindings D:\R and D\Cache_RND_Node\node_modules\couchbase\node_modules\bindings
215 silly lockFile f7d0abcf--couchbase-node-modules-bindings D:\R and D\Cache_RND_Node\node_modules\couchbase\node_modules\bindings
216 silly lockFile 1f615ec5-cache-bindings-1-0-0-package-tgz C:\Users\Amol.Kulkarni\AppData\Roaming\npm-cache\bindings\1.0.0\package.tgz
217 silly lockFile 1f615ec5-cache-bindings-1-0-0-package-tgz C:\Users\Amol.Kulkarni\AppData\Roaming\npm-cache\bindings\1.0.0\package.tgz
218 info preinstall bindings@1.0.0
219 verbose from cache D:\R and D\Cache_RND_Node\node_modules\couchbase\node_modules\bindings\package.json
220 verbose readDependencies using package.json deps
221 verbose from cache D:\R and D\Cache_RND_Node\node_modules\couchbase\node_modules\bindings\package.json
222 verbose readDependencies using package.json deps
223 silly resolved []
224 verbose about to build D:\R and D\Cache_RND_Node\node_modules\couchbase\node_modules\bindings
225 info build D:\R and D\Cache_RND_Node\node_modules\couchbase\node_modules\bindings
226 verbose from cache D:\R and D\Cache_RND_Node\node_modules\couchbase\node_modules\bindings\package.json
227 verbose linkStuff [ false,
227 verbose linkStuff   false,
227 verbose linkStuff   false,
227 verbose linkStuff   'D:\\R and D\\Cache_RND_Node\\node_modules\\couchbase\\node_modules' ]
228 info linkStuff bindings@1.0.0
229 verbose linkBins bindings@1.0.0
230 verbose linkMans bindings@1.0.0
231 verbose rebuildBundles bindings@1.0.0
232 info install bindings@1.0.0
233 info postinstall bindings@1.0.0
234 verbose about to build D:\R and D\Cache_RND_Node\node_modules\couchbase
235 info build D:\R and D\Cache_RND_Node\node_modules\couchbase
236 verbose from cache D:\R and D\Cache_RND_Node\node_modules\couchbase\package.json
237 verbose linkStuff [ false,
237 verbose linkStuff   false,
237 verbose linkStuff   false,
237 verbose linkStuff   'D:\\R and D\\Cache_RND_Node\\node_modules' ]
238 info linkStuff couchbase@0.0.12
239 verbose linkBins couchbase@0.0.12
240 verbose linkMans couchbase@0.0.12
241 verbose rebuildBundles couchbase@0.0.12
242 verbose rebuildBundles [ 'bindings' ]
243 info install couchbase@0.0.12
244 verbose unsafe-perm in lifecycle true
245 silly exec cmd "/c" "node-gyp rebuild"
246 silly cmd,/c,node-gyp rebuild,D:\R and D\Cache_RND_Node\node_modules\couchbase spawning
247 info couchbase@0.0.12 Failed to exec install script
248 info D:\R and D\Cache_RND_Node\node_modules\couchbase unbuild
249 verbose from cache D:\R and D\Cache_RND_Node\node_modules\couchbase\package.json
250 info preuninstall couchbase@0.0.12
251 info uninstall couchbase@0.0.12
252 verbose true,D:\R and D\Cache_RND_Node\node_modules,D:\R and D\Cache_RND_Node\node_modules unbuild couchbase@0.0.12
253 info postuninstall couchbase@0.0.12
254 error couchbase@0.0.12 install: `node-gyp rebuild`
254 error `cmd "/c" "node-gyp rebuild"` failed with 1
255 error Failed at the couchbase@0.0.12 install script.
255 error This is most likely a problem with the couchbase package,
255 error not with npm itself.
255 error Tell the author that this fails on your system:
255 error     node-gyp rebuild
255 error You can get their info via:
255 error     npm owner ls couchbase
255 error There is likely additional logging output above.
256 error System Windows_NT 6.1.7601
257 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "couchbase"
258 error cwd D:\R and D\Cache_RND_Node
259 error node -v v0.10.0
260 error npm -v 1.2.14
261 error code ELIFECYCLE
262 verbose exit [ 1, true ]

<小时/> 的更新
我试图从master(下载的repo)构建它。即使用node-gyp configure&amp; node-gyp build

我得到了不同的错误,如下所示:

D:\R and D\Cache_RND_Node\node_modules\couchnode-master>node-gyp build
gyp info it worked if it ends with ok
gyp info using node-gyp@0.9.2
gyp info using node@0.10.0 | win32 | x64
gyp info spawn msbuild
gyp info spawn args [ 'build/binding.sln',
gyp info spawn args   '/clp:Verbosity=minimal',
gyp info spawn args   '/nologo',
gyp info spawn args   '/p:Configuration=Release;Platform=x64' ]
  Copying C:/couchbase/lib/libcouchbase.dll to D:\R and D\Cache_RND_Node\node_modules\couchnode-master/build/Release/libcouchbase.dll
  The system cannot find the path specified.
  cas.cc
  operations.cc
  notify.cc
  couchbase_impl.cc
d:\r and d\cache_rnd_node\node_modules\couchnode-master\src\couchbase_impl.h(52): fatal error C1083: Cannot open include file: 'libcouchbase/couchbase.h': No such file or directory [D:\R and D\Cache_RND_Node\node_modules\couchnode-master\b
uild\couchbase_impl.vcxproj]
  ioplugin.cc
d:\r and d\cache_rnd_node\node_modules\couchnode-master\src\couchbase_impl.h(52): fatal error C1083: Cannot open include file: 'libcouchbase/couchbase.h': No such file or directory [D:\R and D\Cache_RND_Node\node_modules\couchnode-master\b
uild\couchbase_impl.vcxproj]
d:\r and d\cache_rnd_node\node_modules\couchnode-master\src\couchbase_impl.h(52): fatal error C1083: Cannot open include file: 'libcouchbase/couchbase.h': No such file or directory [D:\R and D\Cache_RND_Node\node_modules\couchnode-master\b
uild\couchbase_impl.vcxproj]
  namemap.cc
d:\r and d\cache_rnd_node\node_modules\couchnode-master\src\couchbase_impl.h(52): fatal error C1083: Cannot open include file: 'libcouchbase/couchbase.h': No such file or directory [D:\R and D\Cache_RND_Node\node_modules\couchnode-master\b
uild\couchbase_impl.vcxproj]
..\src\ioplugin.cc(17): fatal error C1083: Cannot open include file: 'libcouchbase/couchbase.h': No such file or directory [D:\R and D\Cache_RND_Node\node_modules\couchnode-master\build\couchbase_impl.vcxproj]
d:\r and d\cache_rnd_node\node_modules\couchnode-master\src\couchbase_impl.h(52): fatal error C1083: Cannot open include file: 'libcouchbase/couchbase.h': No such file or directory [D:\R and D\Cache_RND_Node\node_modules\couchnode-master\b
uild\couchbase_impl.vcxproj]
gyp ERR! build error
gyp ERR! stack Error: `msbuild` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onExit (C:\Users\Amol.Kulkarni\AppData\Roaming\npm\node_modules\node-gyp\lib\build.js:256:23)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:754:12)
gyp ERR! System Windows_NT 6.1.7601
gyp ERR! command "node" "C:\\Users\\Amol.Kulkarni\\AppData\\Roaming\\npm\\node_modules\\node-gyp\\bin\\node-gyp.js" "build"
gyp ERR! cwd D:\R and D\Cache_RND_Node\node_modules\couchnode-master
gyp ERR! node -v v0.10.0
gyp ERR! node-gyp -v v0.9.2
gyp ERR! not ok

1 个答案:

答案 0 :(得分:3)

您是否尝试按照此link中的步骤操作
这可能会解决问题。