npm install oracledb给出错误:找不到$ OCI_LIB_DIR / libclntsh.dylib

shubhamagiwal92

我正在尝试oracledb使用npm在我的Mac上安装驱动程序。我已经按照给定链接中提到的每个步骤进行了操作当我尝试安装oracledb软件包时:npm install oracledb出现以下错误

> [email protected] install /opt/oracle/instantclient/node_modules/oracledb
> node-gyp rebuild
node-oracledb ERR! Error: Cannot find $OCI_LIB_DIR/libclntsh.dylib
node-oracledb ERR! Error: Do you need to run 'cd $OCI_LIB_DIR && ln -s libclntsh.dylib.* libclntsh.dylib'?
node-oracledb ERR! Error: See https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#instosx
gyp: Call to 'INSTURL="https://github.com/oracle/node-oracledb/blob/master/INSTALL.md#instosx"; ERR="node-oracledb ERR! Error:"; if [ -z $OCI_LIB_DIR ]; then if [ -f /opt/oracle/instantclient/libclntsh.dylib ]; then echo "/opt/oracle/instantclient/"; else echo "$ERR Cannot find /opt/oracle/instantclient/libclntsh.dylib" >&2; echo "$ERR Do you need to run 'cd /opt/oracle/instantclient && ln -s libclntsh.dylib.* libclntsh.dylib'?" >&2; echo "$ERR See $INSTURL" >&2; echo "" >&2; fi; else if [ -f "$OCI_LIB_DIR/libclntsh.dylib" ]; then echo $OCI_LIB_DIR; else echo "$ERR Cannot find \$OCI_LIB_DIR/libclntsh.dylib" >&2; echo "$ERR Do you need to run 'cd \$OCI_LIB_DIR && ln -s libclntsh.dylib.* libclntsh.dylib'?" >&2; echo "$ERR See $INSTURL" >&2; echo "" >&2; fi; fi;' returned exit status 0 while in binding.gyp. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:305:16)
gyp ERR! stack     at emitTwo (events.js:106:13)
gyp ERR! stack     at ChildProcess.emit (events.js:191:7)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
gyp ERR! System Darwin 16.1.0
gyp ERR! command "/usr/local/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild"
gyp ERR! cwd /opt/oracle/instantclient/node_modules/oracledb
gyp ERR! node -v v7.0.0
gyp ERR! node-gyp -v v3.4.0
gyp ERR! not ok 
npm WARN enoent ENOENT: no such file or directory, open '/opt/oracle/instantclient/package.json'
npm WARN instantclient No description
npm WARN instantclient No repository field.
npm WARN instantclient No README data
npm WARN instantclient No license field.
npm ERR! Darwin 16.1.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "oracledb"
npm ERR! node v7.0.0
npm ERR! npm  v3.10.8
npm ERR! code ELIFECYCLE
npm ERR! [email protected] install: `node-gyp rebuild`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] 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.
npm ERR! Please include the following file with any support request:
npm ERR!     /opt/oracle/instantclient/npm-debug.log

我的节点版本是v7.0.0,我的npm版本是v3.10.8有人可以让我知道我做错了什么吗?

克里斯托弗·琼斯(Christopher Jones)

阅读安装文档总之:

  1. 安装XCode
  2. 安装即时客户端
  3. 创建Instant Client 12c使用的符号链接
  4. 将OCI_LIB_DIR和OCI_INC_DIR设置为Instant Client目录
  5. 如果您位于防火墙后面,请设置http_proxy
  6. 运行npm install oracledb如果使用sudo,则可能需要运行sudo -E npm install oracledb

为了帮助您诊断问题,请向我们显示您尝试过的步骤的日志。

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

无法在macOS Big Sur上安装DBD :: Oracle =>找不到依赖的dylib'@ rpath / libclntsh.dylib.19.1'

npm install显示找不到git的错误

brew install npm“ npm:找不到命令”

npm install在多次警告后给出错误

“ npm install”给出错误消息“ invalid”,这是什么?

错误:运行npm install pg后找不到模块'pg'

npm install fsevents错误

npm install 后找不到导入的库

npm install会给出“ npm ERR!代码ENOTFOUND'错误

Python“DPI-1047 无法在 macOS 上找到 dlopen(libclntsh.dylib)”

flatpak install org.telegram.desktop 给出错误:找不到远程引用

运行 npm install 时出错

`npm install npm`给出gyp ERR和npm ERR

在安装'sudo npm install -g @ angular / cli'时在ubuntu中给出错误

npm install产生大量错误

npm install权限被拒绝错误

RubyMotion新鲜项目给出错误dlopen(/Applications/Xcode.app/Contents/Developer /../ Frameworks / libswiftCore.dylib,2):找不到图片

纱线全局添加<package>给出错误“在npm注册表上找不到软件包”

错误:找不到浏览器版本756035。运行“ npm install”

npm install i18next-conv:错误:找不到模块“可读流”

Packer:在Packer脚本中使用npm install-失败,找不到命令错误

npm运行android commad给出找不到符号错误

在npm install -g之后,仍然找不到命令?

webpack:在npm install webpack -g之后找不到命令

通过“ npm install”安装时找不到testcafe命令

npm install geckodriver由于找不到文件而失败[WSL]

npm install --save fs - 安装后找不到包

为什么maven install使用npm会给出此错误?

npm install [email protected]命令给出了ENETUNREACH错误