
Where 19_3 should be replaced by the version you are installing. $ sudo open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkgĪdd the following environment variables to /etc/profileĮxport ORACLE_HOME=/opt/oracle/instantclient_19_3Įxport DYLD_LIBRARY_PATH=/opt/oracle/instantclient_19_3Įxport LD_LIBRARY_PATH=/opt/oracle/instantclient_19_3
#ORACLE 12C FOR MAC INSTALL#
When you are logged in again, open Terminal and install the headers, by using the Apple-provided installer: Please restart the machine for the changes to take effect. Successfully disabled System Integrity Protection. then select Terminal from the Utilities-menu restart you Mac and hold cmd + R while it restarts. This means that you cannot install the oci8 libraries for PHP, without disabling SIP. But since El Capitan, /usr is protected by System Integrity Protection (SIP). I you haven't already, open the Mac App Store via your Apple Menu and download and run Xcode:

$ sudo ln -s /opt/oracle/instantclient_19_3/*.dylib.19.1 /usr/local/lib/ $ sudo ln -s /opt/oracle/instantclient_19_3/*.dylib.12.1 /usr/local/lib/ $ sudo ln -s /opt/oracle/instantclient_19_3/*.dylib /usr/local/lib/ $ sudo ln -s /opt/oracle/instantclient_19_3/sdk/include/*.h /usr/local/include/ $ sudo ln -s /opt/oracle/instantclient_19_3/sqlplus /usr/local/bin/
#ORACLE 12C FOR MAC SOFTWARE#
To be able to use the Oracle software that is now installed, you will have to create symlinks in order for the Mac to treat the files as executables: The version number may differ with your installation. Now I have folder /opt/oracle/instantclient_19_3. $ sudo unzip instantclient-sqlplus-macos.圆4-19.3.0.0.0dbru.zip $ sudo unzip instantclient-sdk-macos.圆4-19.3.0.0.0dbru.zip $ sudo unzip instantclient-basic-macos.圆4-19.3.0.0.0dbru.zip $ sudo cp ~/Downloads/instantclient-*.zip.

Move and unzip the downloaded folders into the Oracle folder: Instantclient-sqlplus-macos.圆4-19.3.0.0.0dbru.zipĬreate a folder where the Oracle client shall be saved permanently: So from all I have read and wasted my time on, I compiled the steps I took to get the client running on my iMac and MacBook Pro, both running Mojave.ĭownload the following 3 files from Oracle into your Downloads-folder: What I've learned from this adventure, is that everything 'Oracle' are some kind of 'I need a stiff drink', self-torture processes.
#ORACLE 12C FOR MAC HOW TO#
I have searched the web for days on how to install the Oracle database client on macOS for use with PHP 7 and read many, many, many instructions, tips and tricks. Oracle Instant Client + OCI8 on macOS Mojave for PHP
