title: Can I install the memcached PHP extension with PECL?
body: <p>I'm having trouble installing the "<a href="http://pecl.php.net/package/memcached" rel="noreferrer">memcached</a>" PHP extension from PECL, though I can successfully installed the "<a href="http://pecl.php.net/package/memcache" rel="noreferrer">memcache</a>" extension. (They are separate PHP extensions.)</p>
  
  <p>For example, these commands work okay:</p>
  
  <blockquote>
    <p>$ sudo pecl install memcache<br>
    $ sudo pecl install APC<br>
    $ sudo pecl install oauth  </p>
  </blockquote>
  
  <p>However, attempting to install memcached causes errors:  </p>
  
  <blockquote>
    <p>$ sudo pecl install memcached<br>
    ...<br>
    ld: library not found for -lmemcached<br>
    collect2: ld returned 1 exit status<br>
    make: *** [memcached.la] Error 1<br>
    ERROR: `make' failed  </p>
  </blockquote>
  
  <p>I'm using pecl, memcached, and libmemcached from Mac Ports (macports.org) on a recent Intel Mac. The libmemcached libraries can be found in /opt/local:</p>
  
  <blockquote>
    <p>/opt/local/include/libmemcached<br>
    /opt/local/include/libmemcached/libmemcached_config.h<br>
    /opt/local/lib/libmemcached.2.0.0.dylib<br>
    /opt/local/lib/libmemcached.2.dylib<br>
    /opt/local/lib/libmemcached.a<br>
    /opt/local/lib/libmemcached.dylib<br>
    /opt/local/lib/libmemcached.la  </p>
  </blockquote>
  
  <p>Any idea what I may be doing wrong?</p>