Node-red-contrib-ibm-db2 error with Db2 in

I’m looking to leverage node-RED to connect to a DB2 docker image I have running. However, when set it up, I get this error (I have node-red running on docker as I have a MacOS device):

“Error: Error loading shared library /data/node_modules/ibm_db/build/Release/odbc_bindings.node: Exec format error”

Does anyone have any ideas on how to resolve this?

Possibly your installation does not meet the fairly extensive pre-requisites:

ibm_db - npm (npmjs.com)

1 Like

Thanks @TotallyInformation, that seems to have helped progressing it further but I am now struggling locating the binding:


I have had to create another instance of node-red on docker and run the pre-requisites installs as root. Any further ideas?

Thanks again!

Try without Docker? It often add significant complexity for little gain.

1 Like

Thanks, that worked. I have followed this tutorial (Node-RED install for Mac OS) with some changes as I have a M1 chip Mac device. Had to install Node.js via nvm using How to install Node.js using NVM on macOS M1 by Aman Mittal & node.js - Install Node on M1 Mac - Stack Overflow

Thanks for the suggestion.

No you didn't. I have been running Node-RED on my Mac mini M1 2020 with NPM v8.19.2 installed and just use the sudo npm install -g --unsafe-perm node-red command as described in
https://nodered.org/docs/getting-started/local