title: Installing PHP imagick through PECL on Mac
body: <p>I'm trying to get the php imagick extension installed on a Mac with High Sierra 10.13.5.</p>
  
  <p>I have PHP 7.2 installed through brew and PEAR 1.10.5 installed. When trying to install imagick using <code>sudo pecl install imagick</code> I get:</p>
  
  <pre><code>Build process completed successfully
  Installing '/usr/include/php/ext/imagick/php_imagick_shared.h'
  ERROR: failed to mkdir /usr/include/php/ext/imagick
  </code></pre>
  
  <p>It looks like I'm hitting the Mac permissions where the install directory should be in <code>/usr/local</code> but I cant figure out how to change it. Any ideas how to fix this?</p>