4

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.

Tester
  • 798
  • 2
  • 12
  • 32
  • Have you tried without --with-libmemcache-dir – guy_fawkes Feb 28 '14 at 18:04
  • Yes, I tried but got `ERROR: `/tmp/pear/temp/memcached/configure --with-libmemcached-dir=no' failed ` – Tester Feb 28 '14 at 18:55
  • I also got `error 'configure: error: no, sasl.h is not available. Run configure with --disable-memcached-sasl to disable this check '` when tried without `--with-libmemcache-dir` – Tester Feb 28 '14 at 18:59

2 Answers2

11

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
Koen.
  • 25,449
  • 7
  • 83
  • 78
David M
  • 1,151
  • 12
  • 21
0

Just use configure with that option: ./configure --disable-memcached-sasl

and it won't need to check for the sasl libs. I did and could then compile...

Not sure why when you specific the --with-libmemcache-dir, it can't figure out where sasl.h is inside that directory... Anyway Here is someinfo on how to setup SASL for memcache... just not sure how to actually get sasl.h recognized within the ./configure script https://code.google.com/p/memcached/wiki/SASLHowto Note: Im not too familiar with SASL but you might want SASL if you are on some sort of shared hosting environment.

armyofda12mnkeys
  • 3,214
  • 2
  • 32
  • 39