2012-10-26 49 views
0

我嘗試使用下面的命令來安裝與甲基苯丙胺的memcache:安裝PECL memcache的.. gcc編譯器將無法正常工作

PECL我的memcache

,但我得到的錯誤:

檢查海合會...海灣合作委員會
檢查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

想通了。它在錯誤的地方尋找XCode。用這個命令來修復:

(只是/Applications/Xcode.app/Contents/Developer而不是在那裏我覺得可能由默認安裝)
sudo xcode-select -switch /Developer/Applications/Xcode.app/Contents/Developer