centos - 安装pecl memcached时出错

标签 centos memcached pecl

我在安装 pecl memcached 包时遇到了真正的麻烦。

我没有对任何 yum 或 pear/pecl 安装命令感到满意我提到了这个问题 Install PECL Memcached Error并开始尝试手动配置/制作

我正在使用 pecl 下载最新的 (memcached-2.2.0) 然后解压、phpize...

如果我使用 --disable-memcached-sasl 配置,配置完成但 make 失败。看起来像语法错误

In file included from /root/memcached-2.2.0/php_memcached_private.h:28,
                 from /root/memcached-2.2.0/php_memcached.c:26:
/root/memcached-2.2.0/php_libmemcached_compat.h:56: error: expected ‘=’, ‘,’, ‘;’, ‘asm’     or ‘__attribute__’ before ‘php_memcached_instance_st’
/root/memcached-2.2.0/php_memcached.c:328: error: expected declaration specifiers or ‘...’ before ‘php_memcached_instance_st’
/root/memcached-2.2.0/php_memcached.c:329: error: expected declaration specifiers or     ‘...’ before ‘php_memcached_instance_st’
/root/memcached-2.2.0/php_memcached.c:330: error: expected declaration specifiers or ‘...’ before ‘php_memcached_instance_st’
/root/memcached-2.2.0/php_memcached.c: In function ‘php_memc_get_impl’:
/root/memcached-2.2.0/php_memcached.c:594: warning: passing argument 4 of     ‘memcached_mget_by_key’ from incompatible pointer type
/usr/include/libmemcached/memcached_get.h:38: note: expected ‘char **’ but argument is of type ‘const char **’
/root/memcached-2.2.0/php_memcached.c: In function ‘php_memc_getMulti_impl’:

还有更多,但希望这是一个足够有用的指标

如果我使用 --with-libmemcached-dir=/usr/include/libmemcached 我得到

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

但这就是 memcached.h 所在的位置

如果我使用 --with-libmemcached-dir=no configure 给出

configure: error: no, libmemcached sasl support is not enabled. Run configure with --disable-memcached-sasl to disable this check

如果我添加 --disable-memcached-sasl 选项,它配置完成但 make 再次失败并出现语法错误

感觉自己陷入了一个循环。

这不是我第一次从头开始设置服务器以使用 memcached(虽然我猜是一段时间以来的第一次)我不记得之前有过任何问题。

有什么想法可以取悦任何人吗?

这看起来是个不错的线索

http://blusmurf.net/2012/08/27/pecl-memcache-build-error/

但还是不快乐

我也一直在从 php-memcached 的 github 页面调查这个问题

https://github.com/php-memcached-dev/php-memcached/issues/69

我现在已经尝试使用 2.1 和 2.2,修改文件以尝试构建 make。仍然没有运气......

最佳答案

如果您不需要 SASL,请回答:

libmemcached 目录 [无]:无 --disable-memcached-sasl

关于centos - 安装pecl memcached时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24407095/

相关文章:

CentOS 6上创建线程时Java进程内存不足

deployment - phing 参数

php - Laravel 中如何避免缓存碰撞?

使用memcached进行Spring缓存

macos - 如何在 mac os 10.13 上安装 php-redis 扩展?

centos - 强制 CEPH 同步和建议 CEPH 更新

java - 缓存资源不存在的事实

PHP, mongo.so 写入失败

php - 适用于 Windows 的 OAuth PHP?

linux - 如何在没有root用户的情况下在centOS上安装rabbitmq和erlang?