首页 > Mac OS X下如何安装node-oracledb?

Mac OS X下如何安装node-oracledb?

Mac OS X下如何安装node-oracledb?
错误提示

npm ERR! Darwin 15.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "oracledb"
npm ERR! node v5.7.1
npm ERR! npm  v3.6.0
npm ERR! code ELIFECYCLE

npm ERR! oracledb@1.8.0 install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the oracledb@1.8.0 install script 'node-gyp rebuild'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the oracledb package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR!     node-gyp rebuild
npm ERR! You can get information on how to open an issue for this project with:
npm ERR!     npm bugs oracledb
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!     npm owner ls oracledb
npm ERR! There is likely additional logging output above.

错误提示很明白,地址https://registry.npmjs.org/node-oracledb不存在,没有node-oracledb这个npm包,确定一下你要安装的模块名到底是什么


你检查下所有的错误日志

是不是这下面这端类似文字出现

node-oracledb ERR! Error: Cannot find /opt/oracle/instantclient/libclntsh.dylib
node-oracledb ERR! Error: Do you need to run 'cd /opt/oracle/instantclient && ln -s libclntsh.dylib.* libclntsh.dylib'?
node-oracledb ERR! Error: See https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#instosx

如果有的话,应该就是 Oracle 驱动之类的信息没有配置好。
可以参考这篇文章来安装,OSX 10.10.2 安装编译node-oracle 及 oracle 官方nodejs 驱动 - satanrabbit的个人页面 - 开源中国社区

【热门文章】
【热门文章】