php安装memcached扩展:configure: error: no, libmemcached sasl support is not enabled
环境:contos 6.3 php 5.3.3
问题:
PHP安装 memcached
扩展遇到如下错误:
pecl install memcached
libmemcached directory [no]:
checking whether libmemcached supports sasl… no
configure: error: no, libmemcached sasl support is not enabled. Run configure with –disable-memcached-sasl to disable this check
ERROR: '/tmp/pear/temp/memcached/configure –with-libmemcached-dir=no' failed
查看 libmemcached
安装路径:
# find /usr -name memcached.h
/usr/local/include/libmemcached-1.0/memcached.h
/usr/local/include/libmemcached-1.0/struct/memcached.h
/usr/local/include/libmemcached/memcached.h
指定 libmemcached directory
路径得到如下错误:
# pecl install memcached
libmemcached directory [no]:/usr/local/include/libmemcached
...
checking for libmemcached location... configure: error: Unable to find memcached.h under /usr/include/libmemcached
解决方法:
- 安装
cyrus-**sasl**-devel
# yum install cyrus-sasl-devel
- 再安装
memcached
扩展(libmemcached
安装时为默认配置,故不指定libmemcached directory
路径)
pecl install memcached
libmemcached directory [no]:
引用文章: