centos memcached报错

服务器端:

make: *** [php_memcached.lo] Error 1

安装libmemcached

./configure --prefix=/usr/local/libmemcached --with-memcached

libmemcached location... configure: error: Unable to find memcached.h under /usr/local/include/libmemcached

(3.0.1编译还是一样不能通过,只好根据博主文章中提到的,下载了php-memcached 2.2.0)

./memcached: error while loading shared libraries: libevent-2.1.so.6: cannot open shared obje

shell代码查看报错:

  LD_DEBUG=libs /usr/local/bin/memcached -v

然后寻找文件路径:find / -name libevent-2.1.so.6

添加链接:

ln -s /usr/local/lib/libevent-2.1.so.6 /usr/lib64/libevent-2.1.so.6
php-memcached扩展: (php7不支持memcached,需要下载redis)


configure: error: no, libmemcached built with sasl disabled. Run configure with --disable-memcached-sasl or update libmemcached with sasl support

configure时添加--disable-memcached-sasl

./configure --with-php-config=/www/source/php/bin/php-config --disable-memcached-sasl