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

猩爷
  • 296

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.
回复
阅读 4.6k
3 个回答

你检查下所有的错误日志

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

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的个人页面 - 开源中国社区

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏