在我的项目中,我们有需要使用 nodejs 连接的 Db2 数据库。我浏览了
ibm_db2
博客,但无法安装 ibm_db2 模块。似乎我需要安装在 Mac 上似乎不可用的 IBM Data Server 驱动程序(我正在使用 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
节点安装程序/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”文件夹并再次尝试但面临同样的问题。
请帮忙。