LjxPrime 发表于 2015-10-4 16:56:36

PHPNG memcached 无法安装

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

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


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



    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..';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

最后安装失败



compilation terminated.make: *** 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 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!


错误原因应该是这句:


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"                                             ^

望军哥及时解决~:)

licess 发表于 2015-10-4 20:01:15

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

估计应该是兼容性问题,这个软件已经2年多没更新了
页: [1]
查看完整版本: PHPNG memcached 无法安装