0

我正在尝试在安装了 Xcode(4.3.2)的 OS X 10.7 上安装 Passenger 时出现错误:“您必须先安装开发工具。”

这对我来说没有意义,为什么找不到合适的要求?我已经从 Apple 商店安装了 Xcode。

是否有它需要的实际需求列表,而不是这个通用消息?或者是否有任何人知道的解决方法可以帮助我在 OSX Lion 上与乘客合作?谢谢!

例外详情:

cd ext/libev/ && make libev.la
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -O3 -c -o ev.lo ev.c
 gcc -DHAVE_CONFIG_H -I. -g -O2 -O3 -c ev.c -o ev.o
/bin/sh ./libtool --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I.     -g -O2 -O3 -c -o event.lo event.c
 gcc -DHAVE_CONFIG_H -I. -g -O2 -O3 -c event.c -o event.o
/bin/sh ./libtool --tag=CC   --mode=link gcc  -g -O2 -O3 -version-info 3:0  -o libev.la -rpath /usr/local/lib ev.lo event.lo  -lm 
mkdir .libs
ar cru .libs/libev.a  ev.o event.o
ranlib .libs/libev.a
creating libev.la
(cd .libs && rm -f libev.la && ln -s ../libev.la libev.la)
g++ ext/common/LoggingAgent/Main.cpp -o agents/PassengerLoggingAgent -Iext -Iext/common -Iext/libev   -D_REENTRANT -I/usr/local/include -DHASH_NAMESPACE="__gnu_cxx" -DHASH_FUN_H="<ext/hash_fun.h>" -DHAS_ALLOCA_H -DHAS_SFENCE -DHAS_LFENCE -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-long-long -Wno-missing-field-initializers -g -DPASSENGER_DEBUG -DBOOST_DISABLE_ASSERTS ext/common/libpassenger_common.a ext/common/libboost_oxt.a ext/libev/.libs/libev.a -lcurl -lz -lpthread  
cd 'ext/ruby/ruby-1.9.2-x86_64-macosx/' && /Users/victorstan/.rvm/wrappers/ruby-1.9.2-p290@contact-monkey/ruby '/Users/victorstan/.rvm/gems/ruby-1.9.2-p290@contact-monkey/gems/passenger-3.0.12/ext/ruby/extconf.rb'
checking for alloca.h... *** /Users/victorstan/.rvm/gems/ruby-1.9.2-p290@contact-monkey/gems/passenger-3.0.12/ext/ruby/extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers.  Check the mkmf.log file for more
details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=/Users/victorstan/.rvm/gems/ruby-1.9.2-p290@contact-monkey/gems/passenger-3.0.12/ext/ruby
    --curdir
    --ruby=/Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/bin/ruby
/Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:368:in `try_do': The complier failed to generate an executable file. (RuntimeError)
You have to install development tools first.
    from /Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:452:in `try_cpp'
    from /Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:834:in `block in have_header'
    from /Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:693:in `block in checking_for'
    from /Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:280:in `block (2 levels) in postpone'
    from /Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:254:in `open'
    from /Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:280:in `block in postpone'
    from /Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:254:in `open'
    from /Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:276:in `postpone'
    from /Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:692:in `checking_for'
    from /Users/victorstan/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/mkmf.rb:833:in `have_header'
    from /Users/victorstan/.rvm/gems/ruby-1.9.2-p290@contact-monkey/gems/passenger-3.0.12/ext/ruby/extconf.rb:36:in `<main>'
rake aborted!
Command failed with status (1): [cd 'ext/ruby/ruby-1.9.2-x86_64-macosx/' &&...]

Tasks: TOP => nginx => native_support => ext/ruby/ruby-1.9.2-x86_64-macosx//passenger_native_support.bundle => ext/ruby/ruby-1.9.2-x86_64-macosx//Makefile
4

2 回答 2

3

您可能需要安装Xcode 命令行工具

在过去,这是 Xcode 安装包中的一个可选项目。苹果现在将它们分开(无论出于何种原因)

于 2012-04-27T15:06:37.440 回答
3

在 XCode 4.3.2 中,您可以从 XCode 的 Preferences 中的“Downloads”下安装命令行开发人员工具。

在此处输入图像描述

于 2012-04-27T17:37:16.967 回答