账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    在服务器上安装instantclient后node仍然无法连接到oracle数据库
    32
    0

    明明已经安装了instantclient ,并且设置了path路径 但是还是出错

    报错如下:
    E:\Dormsys\update_stu_info\node_modules\oracledb\lib\oracledb.js:65
          throw new Error(nodbUtil.getErrorMessage('NJS-045', nodeInfo));
          ^
    
    Error: NJS-045: cannot load the oracledb add-on binary for Node.js 8.11.2 (win32, x64)
    Node.js require() error was: 
      DPI-1047: 64-bit Oracle Client library cannot be loaded: "The specified module could not be found". See https://oracle.github.io/odpi/doc/installation.html#windows for help
    Node.js require() mapped to E:\Dormsys\update_stu_info\node_modules\oracledb\build\Release\oracledb.node
    Node-oracledb installation instructions: https://oracle.github.io/node-oracledb/INSTALL.html
    You must have 64-bit Oracle client libraries in your PATH environment variable.
    If you do not have Oracle Database on this computer, then install the Instant Client Basic or Basic Light package from
    http://www.oracle.com/technetwork/topics/winx64soft-089540.html
    A Microsoft Visual Studio Redistributable suitable for your Oracle client library version must be available.
    
        at Object.<anonymous> (E:\Dormsys\update_stu_info\node_modules\oracledb\lib\oracledb.js:65:13)
        at Module._compile (module.js:652:30)
        at Object.Module._extensions..js (module.js:663:10)
        at Module.load (module.js:565:32)
        at tryModuleLoad (module.js:505:12)
        at Function.Module._load (module.js:497:3)
        at Module.require (module.js:596:17)
        at require (internal/module.js:11:18)
        at Object.<anonymous> (E:\Dormsys\update_stu_info\node_modules\oracledb\index.js:1:80)
        at Module._compile (module.js:652:30)
    [Finished in 0.4s]
    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 一骑轻尘 普通会员 1楼

      可能有以下几种原因导致:

      1. node.js版本不兼容:有些数据库驱动不兼容 node.js 版本,需要升级 node.js 版本或者升级对应的数据库驱动。

      2. 连接参数错误:可能需要将数据库地址、用户名、密码、端口号等参数输入到 instantclient.js 文件中,注意确保参数正确。

      3. 数据库服务未运行:请确保数据库服务正在运行,可以通过 node -v 命令检查 node.js 版本。

      4. 数据库地址不存在:请确保数据库地址是正确的,可以在数据库管理工具中查看。

      5. 密码错误:如果数据库密码错误,需要检查并修改数据库密码。

      6. 其他问题:还有其他可能导致 node.js 无法连接到 Oracle 数据库的问题,例如防火墙阻止、网络问题等。可以尝试检查这些方面,看是否可以解决问题。

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部