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

**URL:** <https://discourse.nodered.org/t/node-red-contrib-ibm-db2-error-with-db2-in/78192>\
**Category:** General\
**Tags:** docker\
**Created:** [4 May 2023 16:35 UTC](https://discourse.nodered.org/t/node-red-contrib-ibm-db2-error-with-db2-in/78192 "2023-05-04T16:35:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![pferreira](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@pferreira](https://discourse.nodered.org/u/pferreira)\
**Post date:** [4 May 2023 16:35 UTC](https://discourse.nodered.org/t/node-red-contrib-ibm-db2-error-with-db2-in/78192/1 "2023-05-04T16:35:18Z")

</div>

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”

 ![PrintScreen from node-red with debug error](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/3/7/37625756044b07fb22a466dd8f92785a88a2e962.png)

Does anyone have any ideas on how to resolve this?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [4 May 2023 21:12 UTC](https://discourse.nodered.org/t/node-red-contrib-ibm-db2-error-with-db2-in/78192/2 "2023-05-04T21:12:30Z")

</div>

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

[ibm\_db - npm (npmjs.com)](https://www.npmjs.com/package/ibm_db)

---

<div class="post-metadata">

**Author:** ![pferreira](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@pferreira](https://discourse.nodered.org/u/pferreira)\
**Post date:** [5 May 2023 14:55 UTC](https://discourse.nodered.org/t/node-red-contrib-ibm-db2-error-with-db2-in/78192/3 "2023-05-05T14:55:47Z")

</div>

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

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/1/a1bc919456c43aefcd8d5b0a3d042fd07103f2f6.png)  
I have had to create another instance of node-red on docker and run the pre-requisites installs as root. Any further ideas?  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/4/2/4269b67c6fde69ea6bfcacf8abc96324a59e7f77.png)  
Thanks again!

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [5 May 2023 16:20 UTC](https://discourse.nodered.org/t/node-red-contrib-ibm-db2-error-with-db2-in/78192/4 "2023-05-05T16:20:42Z")

</div>

> [@pferreira](#):
>
> Any further ideas?

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

---

<div class="post-metadata">

**Author:** ![pferreira](https://avatars.discourse-cdn.com/v4/letter/p/ce73a5/32.png) [@pferreira](https://discourse.nodered.org/u/pferreira)\
**Post date:** [10 May 2023 08:50 UTC](https://discourse.nodered.org/t/node-red-contrib-ibm-db2-error-with-db2-in/78192/5 "2023-05-10T08:50:01Z")

</div>

Thanks, that worked. I have followed this tutorial ([Node-RED install for Mac OS](https://www.youtube.com/watch?v=9cHxLJq30AI)) 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](https://amanhimself.dev/blog/install-nodejs-using-nvm-on-macos-m1/) & [node.js - Install Node on M1 Mac - Stack Overflow](https://stackoverflow.com/questions/65342769/install-node-on-m1-mac)

Thanks for the suggestion.

---

<div class="post-metadata">

**Author:** ![zenofmud](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/zenofmud/32/316_2.png) [@zenofmud](https://discourse.nodered.org/u/zenofmud)\
**Post date:** [10 May 2023 10:15 UTC](https://discourse.nodered.org/t/node-red-contrib-ibm-db2-error-with-db2-in/78192/6 "2023-05-10T10:15:27Z")

</div>

> [@pferreira](#):
>
> as I have a M1 chip Mac device. Had to install Node.js via nvm

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](https://nodered.org/docs/getting-started/local)
