【问题标题】:Install PECL Memcached Error安装 PECL Memcached 错误
【发布时间】:2014-04-01 21:04:30
【问题描述】:

我按照以下步骤在我的 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目录下。

请指教。

【问题讨论】:

  • 你试过没有 --with-libmemcache-dir
  • 是的,我试过了,但是得到了ERROR: /tmp/pear/temp/memcached/configure --with-libmemcached-dir=no' failed `
  • 在没有--with-libmemcache-dir 的情况下尝试时我也得到了error 'configure: error: no, sasl.h is not available. Run configure with --disable-memcached-sasl to disable this check '

标签: php memcached pecl libmemcached


【解决方案1】:

要用 CentOS 解决这个问题,你应该可以运行:

yum install cyrus-sasl-devel

仅供参考,这个问题指的是 CentOS,但对于 Ubuntu,以下应该可以工作:

sudo apt-get install libsasl2-dev

【讨论】:

    【解决方案2】:

    只需使用带有该选项的配置: ./configure --disable-memcached-sasl

    它不需要检查 sasl 库。 我做了,然后可以编译...

    不确定为什么当您指定 --with-libmemcache-dir 时,它无法确定 sasl.h 在该目录中的位置...无论如何这里是一些有关如何为 memcache 设置 SASL 的信息...只是不确定如何在 ./configure 脚本中实际识别 sasl.h https://code.google.com/p/memcached/wiki/SASLHowto 注意:我对 SASL 不太熟悉,但如果您在某种共享托管环境中,您可能需要 SASL。

    【讨论】:

      猜你喜欢
      • 2014-08-15
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-09-21
      • 2017-05-23
      • 1970-01-01
      • 2010-10-15
      • 1970-01-01
      相关资源
      最近更新 更多