Install PECL Memcached Error

Tester picture Tester · Feb 28, 2014 · Viewed 16.1k times · Source

I followed the following steps to install PECL memcached in my Centos Server, always got errors.

First. Install libmemcached

cd /opt
wget http://launchpad.net/libmemcached/1.0/0.40a/+download/libmemcached-0.40.tar.gz
tar -xzvf libmemcached-0.40.tar.gz
cd libmemcached-0.40
./configure
make
make install

Secondly, Install PECL memcached

cd /opt
pecl download memcached-1.0.2
tar zxvf memcached-1.0.2.tgz
cd memcached-1.0.2
phpize
./configure --with-libmemcached-dir=/opt/libmemcached-0.40/libmemcached

I always got error

checking for memcached igbinary support... disabled
configure: error: Can't find libmemcached headers under "/opt/libmemcached-0.40/libmemcached"

Actually memcached.h file is in /opt/libmemcached-0.40/libmemcached direcotry.

Please advice.

Answer

David M picture David M · Oct 12, 2014

To solve this issue with CentOS, you should be able to run:

yum install cyrus-sasl-devel

FYI, this question refers to CentOS, but for Ubuntu, the following should work:

sudo apt-get install libsasl2-dev