无法在Ubuntu上配置/构建CouchNode [英] Trouble configuring/building couchnode on ubuntu

查看:46
本文介绍了无法在Ubuntu上配置/构建CouchNode的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经通过npm安装了nodejs和模块bedbase.沙发底座也已安装,我可以通过浏览器访问后端.

I have installed both nodejs, and the module couchbase via npm. couchbase is installed too, and I can access to the backend via the browser.

相同的server.js文件在Windows上也可以运行.

The same server.js file does work on windows.

我已经安装了python 2.7.我错过了什么吗?

I have installed python 2.7. am I missing something?

出现错误:

marcel@servermarcel:~/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)

当我查看builderror.log时,我看到:

when I look into the builderror.log I see:

$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

推荐答案

我遇到了类似的问题.事实证明,couchbase尝试运行

I had a similar issue. Turns out couchbase tries to run

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

但是在Ubuntu 14.04上,通过apt-get安装的节点是 nodejs .我将其更改为

However on Ubuntu 14.04 with node installed through apt-get it's nodejs. I changed it to

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

node_modules/couchbase/binding.gyp 文件(位于底部附近)中,然后运行 npm rebuild (从我的项目目录中),并且可以正常工作.

in node_modules/couchbase/binding.gyp file (near the bottom), then ran npm rebuild (from my project directory) and it worked.

这篇关于无法在Ubuntu上配置/构建CouchNode的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆