Mac10.11在Xammp中安装php memcached

时间:2015-12-09 09:35:09

标签: php xampp

我的开发环境是Mac 10.11.1,XAMPP for OS X 5.6.12。 我想为XAMMP安装memcached,请参考http://wiki.cerbweb.com/Setup:Development/XAMPP/Mac_OS_X#zlib

Memcache
- sudo /Applications/XAMPP/xamppfiles/bin/pecl install memcache
- 'Yes' when prompted
- stop and start Apache from XAMPP Control Panel.app
- Confirm memcache extension in http://localhost/xampp/phpinfo.php

但是当我运行sudo /Applications/XAMPP/xamppfiles/bin/pecl install memcache时 它是这样的:

gaosongdeMacBook-Pro:bin gaosong$ sudo /Applications/XAMPP/xamppfiles/bin/pecl install memcache
downloading memcache-2.2.7.tgz ...
Starting to download memcache-2.2.7.tgz (36,459 bytes)
..........done: 36,459 bytes
11 source files, building
running: phpize
Configuring for:
PHP Api Version:         20121113
Zend Module Api No:      20121212
Zend Extension Api No:   220121212
Enable memcache session handler support? [yes] : 
building in /private/tmp/pear/install/pear-build-roote06YHQ/memcache-2.2.7
running: /private/tmp/pear/install/memcache/configure --enable-memcache-session=yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for a sed that does not truncate output... /usr/bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-apple-darwin15.0.0
checking host system type... x86_64-apple-darwin15.0.0
checking target system type... x86_64-apple-darwin15.0.0
checking for PHP prefix... /usr/local/Cellar/php55/5.5.30
checking for PHP includes... -I/usr/local/Cellar/php55/5.5.30/include/php -I/usr/local/Cellar/php55/5.5.30/include/php/main -I/usr/local/Cellar/php55/5.5.30/include/php/TSRM -I/usr/local/Cellar/php55/5.5.30/include/php/Zend -I/usr/local/Cellar/php55/5.5.30/include/php/ext -I/usr/local/Cellar/php55/5.5.30/include/php/ext/date/lib
checking for PHP extension directory... /usr/local/Cellar/php55/5.5.30/lib/php/extensions/no-debug-non-zts-20121212
checking for PHP installed headers prefix... /usr/local/Cellar/php55/5.5.30/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... no
checking for nawk... no
checking for awk... awk
checking if awk is broken... no
checking whether to enable memcache support... yes, shared
checking whether to enable memcache session handler support... yes
checking for the location of ZLIB... no
checking for the location of zlib... configure: error: memcache support requires ZLIB. Use --with-zlib-dir=<DIR> to specify prefix where ZLIB include and library are located
ERROR: `/private/tmp/pear/install/memcache/configure --enable-memcache-session=yes' failed

但是我已经通过自制软件安装了ZLIB:

gaosongdeMacBook-Pro:~ gaosong$ brew install zlib
Warning: homebrew/dupes/zlib-1.2.8 already installed

我使用--with-zlib-dir =指定ZLIB包含的前缀和库的位置:

sudo ./pecl install memcached --with-zlib-dir=/usr/local/opt/zlib

sudo ./pecl install memcache --with-zlib-dir=/usr/local

但结果相同:(

你能帮我成功安装内存缓存吗? 非常感谢你!

0 个答案:

没有答案