我正在尝试使用以下命令在MAMP上安装memcache:
pecl i memcache
但是我收到了错误:
检查gcc ... gcc
检查C编译器是否正常工作......否
我正在使用MAMP 2.1.1和PHP 5.4.4运行OS X Mountain Lion。我安装了XCode 4.5。似乎无法弄清楚这一点。
这是我的输出:
new-host-2:bin dwight$ sudo ./pecl i 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
WARNING: php_bin /Applications/MAMP/bin/php/php5.4.4/bin/php appears to have a suffix /php5.4.4/bin/php, but config variable php_suffix does not match
running: phpize
Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
configure.in:3: warning: prefer named diversions
configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
aclocal.m4:3556: AC_LIBTOOL_LINKER_OPTION is expanded from...
aclocal.m4:5568: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:5463: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:3080: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2938: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2918: AC_PROG_LIBTOOL is expanded from...
configure.in:77: the top level
configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
aclocal.m4:3519: AC_LIBTOOL_COMPILER_OPTION is expanded from...
aclocal.m4:8090: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...
aclocal.m4:5568: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:5463: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:3080: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2938: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2918: AC_PROG_LIBTOOL is expanded from...
configure.in:77: the top level
configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_CXX, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
aclocal.m4:3519: AC_LIBTOOL_COMPILER_OPTION is expanded from...
aclocal.m4:8090: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...
aclocal.m4:6520: _LT_AC_LANG_CXX_CONFIG is expanded from...
aclocal.m4:5576: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
aclocal.m4:4708: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:3080: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2938: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2918: AC_PROG_LIBTOOL is expanded from...
configure.in:77: the top level
configure.in:3: warning: prefer named diversions
configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_static_works, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
aclocal.m4:3556: AC_LIBTOOL_LINKER_OPTION is expanded from...
aclocal.m4:5568: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:5463: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:3080: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2938: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2918: AC_PROG_LIBTOOL is expanded from...
configure.in:77: the top level
configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
aclocal.m4:3519: AC_LIBTOOL_COMPILER_OPTION is expanded from...
aclocal.m4:8090: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...
aclocal.m4:5568: _LT_AC_LANG_C_CONFIG is expanded from...
aclocal.m4:5463: AC_LIBTOOL_LANG_C_CONFIG is expanded from...
aclocal.m4:3080: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2938: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2918: AC_PROG_LIBTOOL is expanded from...
configure.in:77: the top level
configure.in:77: warning: AC_CACHE_VAL(lt_prog_compiler_pic_works_CXX, ...): suspicious cache-id, must contain _cv_ to be cached
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
aclocal.m4:3519: AC_LIBTOOL_COMPILER_OPTION is expanded from...
aclocal.m4:8090: AC_LIBTOOL_PROG_COMPILER_PIC is expanded from...
aclocal.m4:6520: _LT_AC_LANG_CXX_CONFIG is expanded from...
aclocal.m4:5576: AC_LIBTOOL_LANG_CXX_CONFIG is expanded from...
aclocal.m4:4708: _LT_AC_TAGCONFIG is expanded from...
aclocal.m4:3080: AC_LIBTOOL_SETUP is expanded from...
aclocal.m4:2938: _AC_PROG_LIBTOOL is expanded from...
aclocal.m4:2918: AC_PROG_LIBTOOL is expanded from...
configure.in:77: the top level
Enable memcache session handler support? [yes] : yes
building in /usr/local/temp/pear-build-root6g1r2w/memcache-2.2.7
running: /usr/local/temp/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 gcc... gcc
checking whether the C compiler works... no
configure: error: in `/usr/local/temp/pear-build-root6g1r2w/memcache-2.2.7':
configure: error: C compiler cannot create executables
See `config.log' for more details
ERROR: `/usr/local/temp/memcache/configure --enable-memcache-session=yes' failed
new-host-2:bin dwight$
帮助?
答案 0 :(得分:0)
想出来了。它在错误的地方寻找XCode。使用此命令修复:
sudo xcode-select -switch /Developer/Applications/Xcode.app/Contents/Developer
(而不仅仅是/Applications/Xcode.app/Contents/Developer,我认为它可以默认安装)