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

 手哥2502852243 发布于 2022-11-03 16:21

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.
2 个回答
  • 你检查下所有的错误日志

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

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

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

    2022-11-06 02:55 回答
撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有