title: Node.JS and DB2 Connection
body: <p>I am attempting to begin writing a Node.JS Application that relies on some data stored in a DB2 database. I've come across two node modules that would work for me. <code>DB2.js</code> and <code>ibm_db</code>, both on the NPMjs site. </p>
  
  <p>After following the install guides for both </p>
  
  <p><a href="https://github.com/herzi/db2.js" rel="nofollow">https://github.com/herzi/db2.js</a></p>
  
  <p>and</p>
  
  <p><a href="https://www.ibm.com/developerworks/community/blogs/pd/entry/using_ibm_db2_from_node_js4?lang=en" rel="nofollow">https://www.ibm.com/developerworks/community/blogs/pd/entry/using_ibm_db2_from_node_js4?lang=en</a></p>
  
  <p>After following IBM's install guide for their module, I realized that I need to get the Linux drivers for DB2 installed. However, their instructions aren't very clear and have me install a new copy of node into my home folder. I have nodejs already installed globally and when I substitute it's install folder at <code>/usr/lib/nodejs</code> I still get compile errors when trying to do <code>node-gyp configure build</code> in either my clone of <code>db2.js</code> or <code>ibm_db</code></p>
  
  <p>The specific error I'm getting is related to some files that are supposed to get installed with the Linux DB2 drivers, namely <code>sqlcli.h</code> and <code>sqlcli1.h</code>. Here is the error message I get when running <code>node-gyp configure build</code> for either project.</p>
  
  <pre><code>gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
  make: Entering directory `/home/mint/Programming/node-ibm_db/build'
    CXX(target) Release/obj.target/odbc_bindings/src/odbc.o
  In file included from ../src/odbc.cpp:25:0:
  ../src/odbc.h:29:21: fatal error: sqlcli1.h: No such file or directory
   #include &lt;sqlcli1.h&gt;
                       ^
  compilation terminated.
  make: *** [Release/obj.target/odbc_bindings/src/odbc.o] Error 1
  make: Leaving directory `/home/mint/Programming/node-ibm_db/build'
  gyp ERR! build error 
  gyp ERR! stack Error: `make` failed with exit code: 2
  gyp ERR! stack     at ChildProcess.onExit (/usr/lib/node_modules/node-gyp/lib/build.js:267:23)
  gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
  gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:789:12)
  gyp ERR! System Linux 3.11.0-12-generic
  gyp ERR! command "node" "/usr/bin/node-gyp" "configure" "build"
  gyp ERR! cwd /home/mint/Programming/node-ibm_db
  gyp ERR! node -v v0.10.15
  gyp ERR! node-gyp -v v0.13.0
  gyp ERR! not ok 
  </code></pre>