wankdanker / node-odbc

ODBC bindings for node
MIT License
174 stars 79 forks source link

Install Fail - sql.h: No such file or directory #79

Closed rudiantotiofan closed 3 years ago

rudiantotiofan commented 5 years ago

make: Entering directory '/home/rudiantotiofan/project/sample/odbc-nest/node_modules/odbc/build' CXX(target) Release/obj.target/odbc/src/odbc.o In file included from ../src/odbc.cpp:22:0: ../src/odbc.h:29:10: fatal error: sql.h: No such file or directory

include

      ^~~~~~~

compilation terminated. odbc.target.mk:114: recipe for target 'Release/obj.target/odbc/src/odbc.o' failed make: *** [Release/obj.target/odbc/src/odbc.o] Error 1 make: Leaving directory '/home/rudiantotiofan/project/sample/odbc-nest/node_modules/odbc/build' gyp ERR! build error gyp ERR! stack Error: make failed with exit code: 2 gyp ERR! stack at ChildProcess.onExit (/opt/node-v10.16.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:198:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12) gyp ERR! System Linux 5.0.0-29-generic gyp ERR! command "/opt/node-v10.16.3-linux-x64/bin/node" "/opt/node-v10.16.3-linux-x64/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "configure" "build" gyp ERR! cwd /home/rudiantotiofan/project/sample/odbc-nest/node_modules/odbc gyp ERR! node -v v10.16.3 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok npm WARN odbc-nest@0.0.1 No repository field. npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules/fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})

npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! odbc@2.0.0-beta.1 install: node-gyp configure build npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the odbc@2.0.0-beta.1 install script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/rudiantotiofan/.npm/_logs/2019-09-26T12_22_29_304Z-debug.log

markdirish commented 5 years ago

It looks like you are installing on Linux. If you don't have it already, you will need install unixODBC and unixODBC-devel. sql.h is provided through unixODBC-devel and allows you to write programs against ODBC.

Also, it looks like you are trying to install 2.0.0-beta.1. There is a 2.2.1 version that is much more stable and complete, you should consider installing that version.

Finally, I don't tend to check the issues on this repo to closely. The package is now built from this repo: https://github.com/markdirish/node-odbc/ . Come join and feel free to post issues there!