Error when installing PHP SDK on macOS

The error above comes from pecl install couchbase, so you have to be super-user to modify system paths and install package using sytem PHP interpreter

The quote above again from that log and displays paths where you are installing the extension. Are they correct?

Have you looked at script you were running from https://php-osx.liip.ch/install.sh? It installs PHP into /usr/local/, so I guess you wanted to use that PHP interpreter.

This only proves my point that you are not using interpreter you have installed from liip.ch. Please check FAQ section there: https://php-osx.liip.ch/#faq
.
To fix your problem, you have to be sure that:

  1. you are installing couchbase PHP extension for interpreter you are going to use
  2. apache httpd server also going to use the interpreter you have used to install extensions
  3. when you update php.ini to load the extension, you are using correct file, which used my php module of apache httpd.