【发布时间】:2014-08-15 22:09:52
【问题描述】:
我在安装 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: 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,破解文件以尝试构建构建。还是没有运气...
【问题讨论】:
-
我遇到了与 libmemcached 和 memcached.h 完全相同的问题。我正在研究它,如果我弄明白了,我会更新。如果您找到解决方案,请更新。
-
我尝试安装 1.0.16 的 libmemcached 以与 php-memcached-2.1 一起使用,但在构建 libmemcached 时出错 ;-) 我仍在谷歌搜索和摆弄,生病让你知道。或者我会使用 redis :-D
-
虽然我已经成功安装了 Memcached(你在构建 libmemcached 时遇到了什么错误?),即使我要使用 Redis - 在我的用例中,我想缓存对象,会话存储将是在不同的应用程序之间共享。 Memcached 不能用于 Session 存储(至少没有扭曲的方法),因此 redis 它是 \m/