ibmdb / node-ibm_db

IBM DB2 and IBM Informix bindings for node
MIT License
190 stars 151 forks source link

Apple Silicon / M1 Chip still doesn't work #935

Closed aryamohanan closed 1 year ago

aryamohanan commented 1 year ago

Hello there, The M1 issue was closed, but I still facing the issue while installing ibm_db.

npm ERR! M1 Chip system with arm64 architecture is not supported. Please install x64 version of node.js to install ibm_db.

For non-Windows system, output of below commands from terminal:

uname : Darwin uname -m : arm64 node -v: v18.16.1 npm ls ibm_db : empty db2level : empty echo $IBM_DB_HOME: empty echo $PATH: /opt/homebrew/bin:/Library/Frameworks/Python.framework/Versions/3.10/bin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin echo $LD_LIBRARY_PATH $DYLD_LIBRARY_PATH : /opt/homebrew/Cellar/gcc@12/12.3.0/lib/gcc/12/libstdc++.6.dylib:/opt/homebrew/Cellar/gcc@12/12.3.0/lib/gcc/12/libstdc++.6.dylib

bimalkjha commented 1 year ago

@aryamohanan You need to follow this documentation: Steps to install ibm_db on MacOS M1/M2 Chip system (arm64 architecture) From error it is clear that you need to install x64 (Intel Only) version of node.js like: https://nodejs.org/dist/v18.16.1/node-v18.16.1-darwin-x64.tar.gz . You can check the type of nodejs installed in your system using command file `which node`. It should display Mach-O 64-bit executable x86_64 not Mach-O 64-bit executable arm64. Then only installation of ibm_db can work. Thanks.

aryamohanan commented 1 year ago

@bimalkjha We tried to follow the steps provided in the documentation, but this is not a working solution for development environment, we need to switch the nvm version daily basis so sadly I accept that we can't use the ibm_db in the M1 architecture. If you have any other ideas please share with us. Thank you.

kirrg001 commented 1 year ago

@bimalkjha Please do not recommend using

arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

This will completely break all programs in /usr/local/bin

bimalkjha commented 1 year ago

@kirrg001 Could you please share the complete step followed by you without using arch -x86_64 so that I can update the steps accordingly? Thanks.