Mac运行node.js连接oracle数据库报DPI-1047: Cannot locate a 64-bit Oracle Client library: “dlopen(libclntsh.dy

错误信息:

DPI-1047: Cannot locate a 64-bit Oracle Client library: "dlopen(libclntsh.dylib, 1): image not found". See https://oracle.github.io/node-oracledb/INSTALL.html for help
Node-oracledb installation instructions: https://oracle.github.io/node-oracledb/INSTALL.html
You must have the 64-bit Oracle Instant Client Basic or Basic Light package libraries in
/usr/local/lib or set by calling oracledb.initOracleClient({libDir: "/my/instant_client_directory"}).
Oracle Instant Client can be downloaded from http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html
翻译:

DPI-1047: Cannot locate a 64-bit Oracle Client library: "dlopen(libclntsh. dll) . "1):图像未找到"。参见https://oracle.github.io/node-oracledb/INSTALL.html寻求帮助
Node-oracledb安装说明:https://oracle.github.io/node-oracledb/INSTALL.html
您必须有64位Oracle即时客户端基本或基本轻包库
/usr/local/lib或通过调用oracledb设置。initOracleClient ({libDir:“/我/ instant_client_directory "})。
Oracle即时客户端可以从http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html下载

处理步骤如下:

1.点击http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html下载Basic Package(我下载的是instantclient-basic-macos.x64-19.8.0.0.0dbru.dmg)

2.下载完成双击 

3.把双击解压出来的东西拷贝到/usr/local/lib (访达>右键>前往文件夹)

OK,连接成功

你可能感兴趣的:(前端,node.js)