VPS侦探论坛

 找回密码
 注册
查看: 3336|回复: 3

lnmp1.6 memcached安装失败

[复制链接]
发表于 2020-3-16 23:22:22 | 显示全部楼层 |阅读模式

环境 CentOS Linux release 7.6.1810 (Core) 内核 :3.10.0-957.el7.x86_64
安装memcached报错,香港的服务器,自己搭建的虚拟 机,都安装报错。
把lnmp1.6卸载,然后安装lnmp1.5也同样报错。
  1. ^
  2. In file included from /usr/local/php/include/php/Zend/zend.h:681:0,
  3.                  from /usr/local/php/include/php/main/php.h:34,
  4.                  from /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.h:22,
  5.                  from /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.c:25:
  6. /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.c:343:49: error: ‘zend_fcall_info’ has no member named ‘object_ptr’
  7.    spprintf (&buffer, 0, "%s::%s", Z_OBJCE_P (fci->object_ptr)->name, fci_cache->function_handler->common.function_name);
  8.                                                  ^
  9. /usr/local/php/include/php/Zend/zend_operators.h:378:48: note: in definition of macro ‘Z_OBJCE’
  10. #define Z_OBJCE(zval)   zend_get_class_entry(&(zval) TSRMLS_CC)
  11.                                                 ^
  12. /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.c:343:35: note: in expansion of macro ‘Z_OBJCE_P’
  13.    spprintf (&buffer, 0, "%s::%s", Z_OBJCE_P (fci->object_ptr)->name, fci_cache->function_handler->common.function_name);
  14.                                    ^
  15. /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.c: In function ‘php_memc_getMulti_impl’:
  16. /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.c:751:5: warning: passing argument 2 of ‘add_assoc_null_ex’ discards ‘const’ qualifier from pointer target type [enabled by default]
  17.      add_assoc_null_ex(return_value, mkeys[i], mkeys_len[i] + 1);
  18.      ^
  19. In file included from /usr/local/php/include/php/main/php.h:38:0,
  20.                  from /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.h:22,
  21.                  from /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.c:25:
  22. /usr/local/php/include/php/Zend/zend_API.h:297:14: note: expected ‘char *’ but argument is of type ‘const char *’
  23. ZEND_API int add_assoc_null_ex(zval *arg, char *key, uint key_len);
  24.               ^
  25. /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.c: In function ‘zim_Memcached_fetch’:
  26. /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.c:1067:2: warning: passing argument 4 of ‘add_assoc_stringl_ex’ discards ‘const’ qualifier from pointer target type [enabled by default]
  27.   add_assoc_stringl_ex(return_value, ZEND_STRS("key"), res_key, res_key_len, 1);
  28.   ^
  29. In file included from /usr/local/php/include/php/main/php.h:38:0,
  30.                  from /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.h:22,
  31.                  from /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.c:25:
  32. /usr/local/php/include/php/Zend/zend_API.h:302:14: note: expected ‘char *’ but argument is of type ‘const char *’
  33. ZEND_API int add_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate);
  34.               ^
  35. /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.c: In function ‘zim_Memcached_fetchAll’:
  36. /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.c:1126:3: warning: passing argument 4 of ‘add_assoc_stringl_ex’ discards ‘const’ qualifier from pointer target type [enabled by default]
  37.    add_assoc_stringl_ex(entry, ZEND_STRS("key"), res_key, res_key_len, 1);
  38.    ^
  39. In file included from /usr/local/php/include/php/main/php.h:38:0,
  40.                  from /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.h:22,
  41.                  from /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.c:25:
  42. /usr/local/php/include/php/Zend/zend_API.h:302:14: note: expected ‘char *’ but argument is of type ‘const char *’
  43. ZEND_API int add_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate);
  44.               ^
  45. /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.c: In function ‘zim_Memcached_getLastErrorMessage’:
  46. /usr/local/php/include/php/Zend/zend_API.h:465:13: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  47.    char *__s=(s);     \
  48.              ^
  49. /usr/local/php/include/php/Zend/zend_API.h:510:39: note: in expansion of macro ‘ZVAL_STRING’
  50. #define RETVAL_STRING(s, duplicate)   ZVAL_STRING(return_value, s, duplicate)
  51.                                        ^
  52. /usr/local/php/include/php/Zend/zend_API.h:522:40: note: in expansion of macro ‘RETVAL_STRING’
  53. #define RETURN_STRING(s, duplicate)  { RETVAL_STRING(s, duplicate); return; }
  54.                                         ^
  55. /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.c:2144:2: note: in expansion of macro ‘RETURN_STRING’
  56.   RETURN_STRING(memcached_last_error_message(m_obj->memc), 1);
  57.   ^
  58. /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.c: In function ‘zim_Memcached_getResultMessage’:
  59. /usr/local/php/include/php/Zend/zend_API.h:465:13: warning: initialization discards ‘const’ qualifier from pointer target type [enabled by default]
  60.    char *__s=(s);     \
  61.              ^
  62. /usr/local/php/include/php/Zend/zend_API.h:510:39: note: in expansion of macro ‘ZVAL_STRING’
  63. #define RETVAL_STRING(s, duplicate)   ZVAL_STRING(return_value, s, duplicate)
  64.                                        ^
  65. /usr/local/php/include/php/Zend/zend_API.h:522:40: note: in expansion of macro ‘RETVAL_STRING’
  66. #define RETURN_STRING(s, duplicate)  { RETVAL_STRING(s, duplicate); return; }
  67.                                         ^
  68. /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.c:2799:4: note: in expansion of macro ‘RETURN_STRING’
  69.     RETURN_STRING(memcached_strerror(m_obj->memc, (memcached_return)i_obj->rescode), 1);
  70.     ^
  71. /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.c: In function ‘php_memc_do_result_callback’:
  72. /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.c:3675:2: warning: passing argument 4 of ‘add_assoc_stringl_ex’ discards ‘const’ qualifier from pointer target type [enabled by default]
  73.   add_assoc_stringl_ex(z_result, ZEND_STRS("key"), res_key, res_key_len, 1);
  74.   ^
  75. In file included from /usr/local/php/include/php/main/php.h:38:0,
  76.                  from /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.h:22,
  77.                  from /root/lnmp1.6-full/src/memcached-2.2.0/php_memcached.c:25:
  78. /usr/local/php/include/php/Zend/zend_API.h:302:14: note: expected ‘char *’ but argument is of type ‘const char *’
  79. ZEND_API int add_assoc_stringl_ex(zval *arg, char *key, uint key_len, char *str, uint length, int duplicate);
  80.               ^
  81. make: *** [php_memcached.lo] Error 1
  82. Copy Memcached PHP Test file...
  83. Restarting php-fpm......
  84. Shutting down php_fpm . done
  85. Starting php_fpm PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/memcached.so' - /usr/local/php/lib/php/extensions/no-debug-non-zts-20060613/memcached.so: cannot open shared object file: No such file or directory in Unknown on line 0
  86. done
  87. iptables: Bad rule (does a matching rule exist in that chain?).
  88. Starting Memcached...
  89. Starting memcached:  done
  90. Memcached install failed!
复制代码
我把报错代码贴上来了,好像是编译的时候,缺少某个组件,导致了问题。请军哥指点。附件中上传了比较长的错误 日志。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2020-3-16 23:46:17 | 显示全部楼层


LNMP1.5安装同样报错,感觉有什么插件未安装一样。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
发表于 2020-3-17 08:50:47 | 显示全部楼层

有可能兼容性问题,如果要使用php 5.2的话尽量使用低版本的系统版本
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2020-3-17 16:35:41 | 显示全部楼层



licess 发表于 2020-3-17 08:50
有可能兼容性问题,如果要使用php 5.2的话尽量使用低版本的系统版本

我有一台同样的,是国内的服务器,安装没问题。我也不知道什么鬼。同样的centos7.6的系统。
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-11-20 23:19 , Processed in 0.026575 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表