npm install ibm_db2 失败(需要使用 nodejs 使用 db2 数据库)
npm install ibm_db2 is failing (need to use db2 database using nodejs)
在我的项目中,我们有 Db2 数据库,我们需要使用 nodejs 连接它。我经历了
ibm_db2
博客但是无法安装 ibm_db2 模块。似乎我需要安装在 Mac 上似乎不可用的 IBM 数据服务器驱动程序(我正在使用 Mac Yosemite 进行开发)。当我尝试“npm install ibm_db2
”
时出现以下错误
bash-3.2$ npm install ibm_db
\
> ibm_db@0.0.8 install
/user/test/jumpstart/node_modules/ibm_db
node installer/driverInstall.js
Downloading DB2 ODBC CLI Driver from http://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/macos64_odbc_cli.tar.gz...
events.js:72
throw er; // Unhandled 'error' event
^
Error: getaddrinfo ENOTFOUND
at errnoException (dns.js:37:11)
at Object.onanswer [as oncomplete] (dns.js:124:16)
npm ERR! ibm_db@0.0.8 install: `node installer/driverInstall.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the ibm_db@0.0.8 install script.
npm ERR! This is most likely a problem with the ibm_db package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node installer/driverInstall.js
npm ERR! You can get their info via:
npm ERR! npm owner ls ibm_db
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 14.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "ibm_db"
npm ERR! cwd /user/test/jumpstart
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
我什至尝试删除 "node_modules" 文件夹并再次尝试,但遇到同样的问题。
请帮忙
ibm_db@0.0.8 node_modules/ibm_db
├── 绑定@1.0.0
├── fstream@1.0.4 (inherits@2.0.1, graceful-fs@3.0.6, mkdirp@0.5.0, rimraf@2.3.2)
├── tar.gz@0.1.1 (commander@1.1.1, tar@0.1.20, fstream@0.1.31)
└── unzip@0.1.11 (setimmediate@1.0.2, readable-stream@1.0.33, match-stream@0.0.2, pullstream@0.4.1, binary@0.3.0, fstream@0.1.31)
你最近试过了吗?
它在 mac 上对我来说工作正常。
您可能希望将问题报告提交至 ibm_db。
我的 mac 版本是 OS X yosemite 10.10.2
您使用的是 64 位 node.j 还是 32 位 node.j?
我正在使用 64 位 node.j
在我的项目中,我们有 Db2 数据库,我们需要使用 nodejs 连接它。我经历了
ibm_db2
博客但是无法安装 ibm_db2 模块。似乎我需要安装在 Mac 上似乎不可用的 IBM 数据服务器驱动程序(我正在使用 Mac Yosemite 进行开发)。当我尝试“npm install ibm_db2
”
bash-3.2$ npm install ibm_db
\
> ibm_db@0.0.8 install
/user/test/jumpstart/node_modules/ibm_db
node installer/driverInstall.js
Downloading DB2 ODBC CLI Driver from http://public.dhe.ibm.com/ibmdl/export/pub/software/data/db2/drivers/odbc_cli/macos64_odbc_cli.tar.gz...
events.js:72
throw er; // Unhandled 'error' event
^
Error: getaddrinfo ENOTFOUND
at errnoException (dns.js:37:11)
at Object.onanswer [as oncomplete] (dns.js:124:16)
npm ERR! ibm_db@0.0.8 install: `node installer/driverInstall.js`
npm ERR! Exit status 8
npm ERR!
npm ERR! Failed at the ibm_db@0.0.8 install script.
npm ERR! This is most likely a problem with the ibm_db package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node installer/driverInstall.js
npm ERR! You can get their info via:
npm ERR! npm owner ls ibm_db
npm ERR! There is likely additional logging output above.
npm ERR! System Darwin 14.1.0
npm ERR! command "node" "/usr/local/bin/npm" "install" "ibm_db"
npm ERR! cwd /user/test/jumpstart
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! code ELIFECYCLE
npm ERR! not ok code 0
我什至尝试删除 "node_modules" 文件夹并再次尝试,但遇到同样的问题。
请帮忙
ibm_db@0.0.8 node_modules/ibm_db ├── 绑定@1.0.0 ├── fstream@1.0.4 (inherits@2.0.1, graceful-fs@3.0.6, mkdirp@0.5.0, rimraf@2.3.2) ├── tar.gz@0.1.1 (commander@1.1.1, tar@0.1.20, fstream@0.1.31) └── unzip@0.1.11 (setimmediate@1.0.2, readable-stream@1.0.33, match-stream@0.0.2, pullstream@0.4.1, binary@0.3.0, fstream@0.1.31)
你最近试过了吗? 它在 mac 上对我来说工作正常。 您可能希望将问题报告提交至 ibm_db。 我的 mac 版本是 OS X yosemite 10.10.2
您使用的是 64 位 node.j 还是 32 位 node.j? 我正在使用 64 位 node.j