- 积分
- 8
- 威望
-
- 金钱
-
- 注册时间
- 2014-9-27
- 在线时间
- 小时
- 最后登录
- 1970-1-1
|
安装的是第一个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.[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
复制代码
最后安装失败
- 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!
复制代码
错误原因应该是这句:
- 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" ^
复制代码
望军哥及时解决~ |
|