VPS侦探论坛

 找回密码
 注册
查看: 4088|回复: 1

PHPNG memcached 无法安装

[复制链接]
发表于 2015-10-4 16:56:36 | 显示全部楼层 |阅读模式

安装的是第一个memcache(dz),一开始提示找不到版本

  1. Error: can't get php version!Maybe php was didn't install or php configuration file has errors.Please check.
复制代码



然后我就把memcached.sh修改了一下



  1.     if echo "${Cur_PHP_Version}" | grep -Eqi '^5.2.';then        sed -i "/extension_dir =/a\extension = "${PHP_ZTS}"" /usr/local/php/etc/php.ini    elif echo "${Cur_PHP_Version}" | grep -Eqi '^5.[3456].';then        sed -i "/the dl()/i\extension = "${PHP_ZTS}"" /usr/local/php/etc/php.ini    elif echo "${Cur_PHP_Version}" | grep -Eqi '^7.0.';then        sed -i "/the dl()/i\extension = "${PHP_ZTS}"" /usr/local/php/etc/php.ini    else        echo "Error: can't get php version!"        echo "Maybe php was didn't install or php configuration file has errors.Please check."        sleep 3        exit 1    fi
复制代码


最后安装失败



  1. compilation terminated.make: *** [memcache.lo] Error 1Copy Memcached PHP Test file...cp: cannot create regular file ‘/home/wwwroot/default/memcached.php’: No such file or directoryRestarting php-fpm......Gracefully shutting down php-fpm . doneStarting php-fpm [04-Oct-2015 16:54:03] NOTICE: PHP message: PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/php/lib/php/extensions/no-debug-non-zts-20141001/memcache.so' - /usr/local/php/lib/php/extensions/no-debug-non-zts-20141001/memcache.so: cannot open shared object file: No such file or directory in Unknown on line 0 doneThe service command supports only basic LSB actions (start, stop, restart, try-restart, reload, force-reload, status). For other actions, please try to use systemctl.Starting Memcached...Starting memcached:  doneMemcached install failed!
复制代码



错误原因应该是这句:


  1. In file included from /root/lnmp1.2-full/src/memcache-3.0.8/php_memcache.h:34:0,                 from /root/lnmp1.2-full/src/memcache-3.0.8/memcache.c:30:/root/lnmp1.2-full/src/memcache-3.0.8/memcache_pool.h:45:47: fatal error: ext/standard/php_smart_str_public.h: No such file or directory #include "ext/standard/php_smart_str_public.h"                                               ^
复制代码


望军哥及时解决~
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2015-10-4 20:01:15 | 显示全部楼层


你看一下 /usr/local/php/include/php/ext/standard/ 下面是否存在php_smart_str_public.h

估计应该是兼容性问题,这个软件已经2年多没更新了
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-4-27 05:31 , Processed in 0.025429 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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