我按照以下步骤在CentOS服务器中安装pecl memcached,总是出错。
第一。安装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

其次,安装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

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

实际上memcached.h文件在/opt/libmemcached-0.40/libmemcached目录中。
请指教。

最佳答案

要使用CentOS解决此问题,您应该能够运行:

yum install cyrus-sasl-devel

仅供参考,这个问题指的是centos,但是对于ubuntu来说,以下应该可以工作:
sudo apt-get install libsasl2-dev

10-04 20:58