bernie2436
bernie2436

Reputation: 23921

Error: Please specify the prefix where libmemcached headers are located

I am trying to install memcached with Pecl and Pear. When I run this command

Abrams-MacBook-Air-3:recurly abramhandler$ sudo pecl install memcached --with-libememcached-dir=/usr/lib/libmemcached-1.0.17/libmemcached

I get the following error

checking for libmemcached location... configure: error: memcached support requires libmemcached 1.0.x. Use --with-libmemcached-dir=<DIR> to specify the prefix where libmemcached headers and library are located
ERROR: `/private/tmp/pear/install/memcached/configure' failed

This dir contains a lot of header files, but seems to maybe be the wrong one?

/usr/lib/libmemcached-1.0.17/libmemcached

What headers is memcached looking for? What directory should I include in the install command?

Upvotes: 3

Views: 3200

Answers (2)

Thomas Decaux
Thomas Decaux

Reputation: 22691

You can pass configuration options like:

pecl install -D 'with-php-config="/usr/local/bin/php-config" with-libmemcached-dir="/usr"  with-zlib-dir="no" enable-memcached-msgpack="no" enable-memcached-json="no"  with-system-fastlz="no" enable-memcached-igbinary="yes" enable-memcached-protocol="yes" enable-memcached-sasl="yes" enable-memcached-session="yes"' memcached

Upvotes: 0

cweiske
cweiske

Reputation: 31117

pecl does not allow passing configuration arguments when compiling extensions.

You have to extract the archive yourself and do the installation yourself, too. Instructions can be found on http://cweiske.de/tagebuch/phpfarm-install-extensions.htm

Upvotes: 0

Related Questions