admin管理员组文章数量:1122846
I am trying to install npm package oracledb version 5.1.0. However I am unable to install the package on my M2 Mac machine even after installing binaries.
I installed the basic(dmg) from .html and followed the instructions to install it, I can the see the path is part of the bash_profile $PATH. However, I am still getting the error when running npm install
npm error oracledb ERR! NJS-067: a pre-built node-oracledb binary was not found for darwin arm64
npm error oracledb ERR! Try compiling node-oracledb source code using .html#github
I cannot install oracledb package version of 6 and above due to the issues in code it is causing. How can I rectify this ?
I am trying to install npm package oracledb version 5.1.0. However I am unable to install the package on my M2 Mac machine even after installing binaries.
I installed the basic(dmg) from https://www.oracle.com/database/technologies/instant-client/macos-arm64-downloads.html and followed the instructions to install it, I can the see the path is part of the bash_profile $PATH. However, I am still getting the error when running npm install
npm error oracledb ERR! NJS-067: a pre-built node-oracledb binary was not found for darwin arm64
npm error oracledb ERR! Try compiling node-oracledb source code using https://oracle.github.io/node-oracledb/INSTALL.html#github
I cannot install oracledb package version of 6 and above due to the issues in code it is causing. How can I rectify this ?
Share Improve this question asked Nov 21, 2024 at 20:08 africandrogbaafricandrogba 3471 gold badge4 silver badges11 bronze badges 4- What are the issues stopping you moving to node-oracledb version 6? – Christopher Jones Commented Nov 21, 2024 at 21:46
- The code that is written for oracledb 5.x version is not working with version 6. It needs additional code changes which I didnt want to get into. – africandrogba Commented Nov 21, 2024 at 21:51
- Code changes related to thin vs thick mode that comes with oracle 6 – africandrogba Commented Nov 21, 2024 at 21:57
- What changes other than calling initOracleClient(), which you may be calling already? – Christopher Jones Commented Nov 22, 2024 at 3:44
1 Answer
Reset to default 0See How to Install node-oracledb 5.5 and Oracle Database on Apple M1/M2 Silicon. But I have a feeling this may not work with newer versions of Node.js.
In summary, make sure your Node.js binary is for Intel.
$ brew install nvm
$ arch -x86_64 zsh
$ nvm install 16
$ npm install oracledb
And install Instant Client for Intel (not ARM):
$ cd $HOME/Downloads
$ curl -O https://download.oracle.com/otn_software/mac/instantclient/198000/instantclient-basic-macos.x64-19.8.0.0.0dbru.dmg
$ curl -O https://download.oracle.com/otn_software/mac/instantclient/198000/instantclient-sqlplus-macos.x64-19.8.0.0.0dbru.dmg
$ hdiutil mount instantclient-basic-macos.x64-19.8.0.0.0dbru.dmg
$ hdiutil mount instantclient-sqlplus-macos.x64-19.8.0.0.0dbru.dmg
$ /Volumes/instantclient-basic-macos.x64-19.8.0.0.0dbru/install_ic.sh
$ hdiutil unmount /Volumes/instantclient-basic-macos.x64-19.8.0.0.0dbru
$ hdiutil unmount /Volumes/instantclient-sqlplus-macos.x64-19.8.0.0.0dbru
版权声明:本文标题:node.js - Unable to install npm package oracledb on M2 Mac even after installation of binaries - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1736307466a1933320.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论