简体   繁体   English

CentOS上的Node.js ibm_db安装错误

[英]Node.js ibm_db installation error on CentOS

I'm making a simple app with angular and nodeJS, and need to connect to DB2 to access some procedures. 我正在使用angular和nodeJS制作一个简单的应用程序,并且需要连接到DB2来访问一些过程。 The nodeJS server is installed in a Centos 6.5 server machine, but when I tried to install ibm_db using npm it showed some kind of error, started with nodeJS服务器安装在Centos 6.5服务器机器上,但是当我尝试使用npm安装ibm_db时,它显示出某种错误,开始于

{ [Error: Command failed: In file included from ../src/odbc.h:23,
                 from ../src/odbc.cpp:25:

and ended with some kind of GYP error. 并以某种GYP错误结束。

> gyp ERR! build error
> gyp ERR! stack Error: `make` failed with exit code: 2
> gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:267:23)
> gyp ERR! stack     at ChildProcess.emit (events.js:98:17)
> gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:820:12)
> gyp ERR! System Linux 2.6.32-504.el6.x86_64
> gyp ERR! command "node" "/usr/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" "--IBM_DB_HOME=/var/www/html/m-siam/trunk/server/node_modules/ibm_db/installer/clidrive
> gyp ERR! cwd /var/www/html/m-siam/trunk/server/node_modules/ibm_db
> gyp ERR! node -v v0.10.36
> gyp ERR! node-gyp -v v0.10.6

gyp ERR! 糟糕! not ok 不好

And when I tried to run the nodeJS server, it showed 'could not load the bindings file' error. 当我尝试运行nodeJS服务器时,它显示“无法加载绑定文件”错误。

How do I install this module properly? 如何正确安装此模块? I'm using nodeJS 0.10.36 and installing both ibm_db version 0.0.8 (the one coming from package.json) and version 0.0.10 result in the same error. 我正在使用nodeJS 0.10.36并安装ibm_db版本0.0.8(一个来自package.json)和版本0.0.10导致相同的错误。

Somehow, my colleague was able to install ibm_db module on another nodeJS directory. 我的同事以某种方式能够在另一个nodeJS目录上安装ibm_db模块。 Maybe my app's directory dress is too long, I don't know, but I just copied the module from my colleague's directory to my own, and it now works perfectly. 也许我的应用程序的目录目录太长了,我不知道,但是我只是将模块从同事的目录复制到了自己的目录中,现在可以正常使用了。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM