title: gnupg for PHP on OSX
body: <p>I'm trying to set up gnupg for use in PHP on my mac.</p>
  
  <p>I have tried following the directions found at the following links:</p>
  
  <p><a href="http://measure9.varkel.net/2013/10/building-gnupg-for-php-5-5-on-osx/" rel="nofollow noreferrer">http://measure9.varkel.net/2013/10/building-gnupg-for-php-5-5-on-osx/</a>
  <a href="https://stackoverflow.com/questions/23298725/install-php-gnupg-using-pecl-on-mac-mamp-10-8-4">Install PHP gnupg using PECL on MAC/MAMP 10.8.4</a></p>
  
  <p>What I seem to be running into with both is this message:</p>
  
  <p>checking for gpgme_check_version in -lgpgme... no
  configure: error: wrong gpgme lib version or lib not found</p>
  
  <p>I see this when executing the './configure' command.</p>
  
  <p>I have installed gpgme using Homebrew.</p>
  
  <p>I'm a bit stuck as I've tried everything I can come up with and haven't had any luck.  </p>
  
  <p>I am running PHP 5.6.7 on OSX 10.10.2 using MAMP Pro.</p>
  
  <p>Thank you in advance for any help you can provide.</p>
  
  <p>EDIT:</p>
  
  <p>My original question was unclear, so I'll try again.</p>
  
  <p>I am trying to install gnupg for use in PHP in my dev environment, which is a macbook using MAMP.</p>
  
  <p>I fist installed gpgme and gnpug using Homebrew, both with no issues.</p>
  
  <p>Then I attempted to install gnupg using pecl via the following command</p>
  
  <pre><code>sudo pecl install gnupg
  </code></pre>
  
  <p>And I end up with this error message</p>
  
  <pre><code>configure: error: wrong gpgme lib version or lib not found
  ERROR: `/private/tmp/pear/install/gnupg/configure' failed
  </code></pre>
  
  <p>I have tried editing my path with no success, adding usr/local/include and usr/local/lib, where gpgme.h and libgpgme.a files can be found.  I see no change in the error message.</p>
  
  <p>EDIT 2:</p>
  
  <p>I believe that gpgme is being installed correctly and pecl is able to find it.  I install it using the following command</p>
  
  <pre><code>brew install gpgme
  </code></pre>
  
  <p>If I then run the pecl command to install gnupg, I get the error message above.</p>
  
  <p>Now, if I execute the brew command to uninstall gpgme</p>
  
  <pre><code>brew uninstall gpgme
  </code></pre>
  
  <p>I see the following error message when trying to install gnupg with pecl</p>
  
  <pre><code>configure: error: Please reinstall the gpgme distribution
  ERROR: `/private/tmp/pear/temp/gnupg/configure' failed
  </code></pre>
  
  <p>which seems to indicate that the library is installing and being found, but it's an incorrect version.  </p>
  
  <p>I am unable to find any information on what version is required for pecl to install gnupg.</p>
  
  <p>EDIT 3:</p>
  
  <p>Looking at the terminal a little more, I see that it's failing to find a specific function (gpgme_check_version) in the lib file.  </p>
  
  <pre><code>checking for gpgme_check_version in -lgpgme... no
  configure: error: wrong gpgme lib version or lib not found
  ERROR: `/private/tmp/pear/temp/gnupg/configure' failed
  </code></pre>