2014-10-19 5 views
4

npm을 통해 nodejs와 모듈 couchbase를 모두 설치했습니다. couchbase도 설치되어 있습니다. 및 브라우저를 통해 백엔드에 액세스 할 수 있습니다.우분투에서 couchnode를 구성하는 데 문제가 있습니다.

동일한 server.js 파일이 창에서 작동합니다.

저는 python 2.7을 설치했습니다. 내가 뭔가 빠진거야?

임 오류를 받고 : 나는 내가 보는 builderror.log으로 볼 때

[email protected]:~/game$ nodejs server.js 

/home/marcel/game/node_modules/couchbase/lib/binding.js:156 
    throw new Error('Failed to locate couchnode native binding' + 
     ^
Error: Failed to locate couchnode native binding (maybe check builderror.log!) 
    at Object.<anonymous> (/home/marcel/game/node_modules/couchbase/lib/binding.js:156:9) 
    at Module._compile (module.js:456:26) 
    at Object.Module._extensions..js (module.js:474:10) 
    at Module.load (module.js:356:32) 
    at Function.Module._load (module.js:312:12) 
    at Module.require (module.js:364:17) 
    at require (module.js:380:17) 
    at Object.<anonymous> (/home/marcel/game/node_modules/couchbase/lib/couchbase.js:3:15) 
    at Module._compile (module.js:456:26) 
    at Object.Module._extensions..js (module.js:474:10) 

가 :

$all to 'node -e "require('nan')"' returned exit status 1.le trying to load binding.gyp 

gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1 
gyp ERR! stack  at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.$ 
gyp ERR! stack  at ChildProcess.EventEmitter.emit (events.js:98:17) 
gyp ERR! stack  at Process.ChildProcess._handle.onexit (child_process.js:797$ 
gyp ERR! System Linux 3.13.0-36-generic 
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild" 
gyp ERR! cwd /home/marcel/game/node_modules/couchbase 
gyp ERR! node -v v0.10.25 
gyp ERR! node-gyp -v v0.10.10 
gyp ERR! not ok 
+0

안녕하세요! 이 게시물은 수퍼 유저 사이트에 더 적합 할 수 있습니다. 여기에는 더 많은 행운이있을 수 있습니다 (예외적으로 Java 예외도 처리하므로 경계 상황이라고 생각합니다). – Rick77

답변

4

나는 비슷한 문제를 가지고 있었다. 카우치베이스 주식회사 밝혀

node -e "require(\'nan\')" 

그러나 우분투 14.04에 통해 설치 노드와는 nodejs의 apt-get을 실행하려고합니다. 그때, (아래쪽) node_modules/couchbase/binding.gyp 파일에

nodejs -e "require(\'nan\')" 

로 변경 npm rebuild를 실행 (내 프로젝트 디렉토리에서) 그것은했다.

+0

감사합니다. 이것은 내 문제를 해결했다. [link] (http://stackoverflow.com/questions/24698159/error-connecting-to-couchbase-from-node-js-using-couchnode-module-v-1-2)로 쉽게 해결할 수있는 다른 문제가있었습니다. -4) – InsOp

+0

감사합니다. 이로 인해 문제가 해결되었습니다. – thefourtheye

+0

고맙습니다. 그것은 나를 위해 작동합니다. –

0

동일한 오류가 있었지만 위에서 언급 한 node -e -> nodejs -e 대체로 문제가 해결되지 않았습니다. //node_modules/couchbase/builderror.log에 대한 추가 조사가있을 때 예상되는 파이썬 버전은 2.5 이상이고 < 3.0 (윈도우 박스가 있음)입니다. 그래서 python 3.4.x를 제거하고 2.7.9를 설치했습니다. 이 문제가 해결되었습니다.