How to install Oracle Instant Client on a Mac?

Ben picture Ben · Jun 8, 2016 · Viewed 33.9k times · Source

How to install Oracle Instant Client Version 12.1.0.2 (64-bit) on a Mac (OS X 10.11.5)

I have downloaded version 12.1.0.2 (64-bit) version and unzipped the file.

I now have the following files under /downloads/instantclient:

libclntsh.dylib.12.1
libclntshcore.dylib.12.1
libnnz12.dylib
libocci.dylib.12.1
libociei.dylib
libocijdbc12.dylib
libons.dylib
liboramysql12.dylib
ojdbc6.jar
ojdbc7.jar
uidrvci
xstreams.jar
adrci
BASIC_README
genezi

I don't have the slightest idea how to go from this to a working version of Instant Client so I can connect to a db from the CLI. The instructions on Oracles website seem to be overly complicated.

I have found a few blogs detailing the installation method, but they all seem to be from previous version of Instant Client. Out of desperation, I downloaded a previous version of Instant Client, but still seemed to be missing files referred to in the tutorial.

Does anyone know how I can get Oracle Instant Client on my Mac?

Answer

dengApro picture dengApro · May 18, 2018

HomeBrew saved me. I do not figure out the environment path.

1. Download the two files below from http://www.oracle.com/technetwork/topics/intel-macsoft-096467.html.

This is necessary because of Oracle licenses.

instantclient-basic-macos.x64–11.2.0.4.0.zip and instantclient-sqlplus-macos.x64–11.2.0.4.0.zip

Put the files in ~/Library/Caches/Homebrew


PS:

in the latest versions of HomeBrew replace the above location ~/Library/Caches/HomeBrew with ~/Library/Caches/HomeBrew/downloads.

And also rename the downloaded files with the names suggested by HomeBrew.

Thanks to @manuka_m


2. Next run the following commands

$ brew tap InstantClientTap/instantclient

$ brew install instantclient-basic

$ brew install instantclient-sqlplus

Originated from Joost van Wollingen's doc