一,安装libmemcached
地址:https://launchpad.net/libmemcached/+download
正常安装即可,可以指定prefix,指定后在安装memcached时需要指定libmemcached的安装位置 : --with-libmemcached-dir=
二,安装memcached
地址http://pecl.php.net/package-search.php?pkg_name=memcache&bool=AND&submit=Search
正常解压,执行phpize
./configure --with-php-config=
提示:configure: error: no, sasl.h is not available. Run configure with --disable-memcached-sasl to disable this check
centos :
yum install cyrus-sasl-devel
ubuntu:
apt-get install libsasl2-dev
再次./configure --with-php-config=
再次提示: configure: error: no, libmemcached sasl support is not enabled. Run configure with --disable-memcached-sasl to disable this check
解决方法:安装完cyrus-sasl-devel或者libsasl2-dev后重新编译libmemcached然后再次编译memcached即可