PHP installation fails on OS X 10.11 - El Capitan


You attempt to install the PHP agent on OS X 10.11 - El Capitan, and it fails.

Failure with the install script

Using the script newrelic-install you encounter something similar to this:

   Install daemon ([y]es, [n]o or x to e[x]it): y

FATAL: failed to copy new daemon into place
FATAL: New Relic agent installation failed.

       Please contact
       and report the above error. We have also created a tar file with
       log files and other system info that can help solve the problem.
Failure with the manual install process

Using the manual install process with the install utility nrmaninstall.php, or following the manual instructions, you encounter something similar to this:

$ sudo cp ./agent/x86_64/ /usr/lib/php/extensions/no-debug-non-zts-20121212/
cp: /usr/lib/php/extensions/no-debug-non-zts-20121212/ Operation not permitted

$ sudo cp ./daemon/newrelic-daemon.x86_64 /usr/bin/newrelic-daemon
cp: /usr/bin/newrelic-daemon: Operation not permitted


The PHP agent may be installed by disabling (SIP). This is true for both the newrelic-install script and manual installations.

This is not an endorsement for disabling SIP in general. Be sure to verify that this does not violate the security policies of your organization.

The general procedure is:

  1. Boot into recovery mode.
  2. Disable SIP and reboot.
  3. Install the New Relic PHP agent.
  4. Boot into recovery mode.
  5. Re-enable SIP and reboot.

There are many articles available on the web that describe SIP and the steps for disabling, re-enabling, and checking the status.


PHP agent installation requires the daemon program to be installed in /usr/bin and the extension module in /usr/lib. However, those directories have R-X permissions, which means the daemon cannot be installed by normal means.

Apple's System Integrity Protection, SIP, prevents the modification of permissions on these directories even when logged in as root, admin or via a sudo privileged account. This also applies in situations where the PHP bin is self-contained (for example, MAMP).

For more help

If you need more help, check out these support and learning resources: