Skip to content

npm install error OSX #109

@brandonpsmith

Description

@brandonpsmith

OSX 10.12.5
Node 8.1.2
NPM 5.0.3

unixodbc installed with Homebrew
Homebrew symlinks the sql.h file from the Cellar to /usr/local/include

When I try to run "npm install odbc" I get the error below.

../src/odbc.h:30:10: fatal error: 'sql.h' file not found
#include <sql.h>
^
1 error generated.

After some googling ... I noticed some user's were setting an environment variable CPLUS_INCLUDE_PATH with /usr/local/include then running "npm install odbc". I tried this and the install completed with no errors. I'm not sure how this fixed the install but it did. I'm just reporting this for future OSX user's that have the same issue.

export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/local/include

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions