Search code examples
phporacle-databasemacospecloci8

Trying to install OCI8 for PHP


I am trying to install the php (5.5) extension OCI8 for my Oracle 11g database. However upon doing sudo pecl install oci8-2.0.8 I get the following error:

[...] Build process completed successfully

Installing '/usr/lib/php/extensions/no-debug-non-zts-20121212/oci8.so'

ERROR: failed to write /usr/lib/php/extensions/no-debug-non-zts-20121212/oci8.so (copy(/usr/lib/php/extensions/no-debug-non-zts-20121212/oci8.so): failed to open stream: Operation not permitted)

Changing directories to the build path (tmp/pear/install/...) returns directory non-existent.

I am on Mac OSX El Capitan, I have followed these instructions, which noted PHP 5.4 not 5.5.

Not sure what to do anymore - it's one problem after another.


Solution

  • Solved by disabling System Integrity Protection, running the pecl install, and re-enabling System Integrity Protection.