Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save refractalize/5ff2d59253a99e294670 to your computer and use it in GitHub Desktop.
Save refractalize/5ff2d59253a99e294670 to your computer and use it in GitHub Desktop.
Install node-oracledb on OS X 10.11 El Capitan

Installing Oracle Clients on Mac OS X El Capitan

(This page is a simplification of another guide to installing oracle on Mac OS X, from which this was forked.)

Get InstantClient version numbers

Run these brew commands:

brew install InstantClientTap/instantclient/instantclient-basiclite
brew install InstantClientTap/instantclient/instantclient-sdk
brew install InstantClientTap/instantclient/instantclient-sqlplus # optional

Note the version numbers printed above.

Download the InstantClient zip files

Go to the Mac OS X downloads page for Oracle InstantClient.

Download the following packages with the same version numbers as indicated in the brew install commands above.

  • Instant Client Package - Basic Lite x64
  • Instant Client Package - SDK x64
  • Instant Client Package - SQL*Plus x64 (optional)

Place each of these zip files in the directory reported by brew --cache, something like /home/user/Library/Caches/Homebrew.

Install (again) with Homebrew

brew install InstantClientTap/instantclient/instantclient-basiclite
brew install InstantClientTap/instantclient/instantclient-sdk
brew install InstantClientTap/instantclient/instantclient-sqlplus # optional

Environment Variables

Set the following environment variables in your shell RC so we can install the node-oracledb NPM module.

export OCI_LIB_DIR=$(brew --prefix)/lib
export OCI_INC_DIR=$(brew --prefix)/lib/sdk/include

Finally, Install node-oracledb

npm install oracledb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment