xcode brew in 不适合我 OSX 10.7

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9598917/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 23:33:04  来源:igfitidea点击:

brew in not working for me OSX 10.7

xcodemacoshomebrew

提问by mxcl

I have installed xcode 4.3 and its running but when I do brew install wget. I get

我已经安装了 xcode 4.3 并且它正在运行,但是当我执行 brew install wget 时。我得到

    ==> Downloading http://ftpmirror.gnu.org/wget/wget-1.13.4.tar.bz2
    ######################################################################## 100.0%
    ==> ./configure --disable-debug --prefix=/usr/local/Cellar/wget/1.13.4 --sysconfdir=/usr/local/etc --with-ssl=openssl --disable
    configure: configuring for GNU Wget 1.13.4
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
    checking for gawk... no
    checking for mawk... no
    checking for nawk... no
    checking for awk... awk
    checking whether make sets $(MAKE)... yes
    checking build system type... x86_64-apple-darwin11.3.0
    checking host system type... x86_64-apple-darwin11.3.0
    checking for gcc... /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
    checking whether the C compiler works... no
    configure: error: in `/private/tmp/homebrew-wget-1.13.4-PMov/wget-1.13.4':
    configure: error: C compiler cannot create executables
    See `config.log' for more details
    ==> Exit Status: 77
    http://github.com/mxcl/homebrew/blob/master/Library/Formula/wget.rb#L24
    ==> Environment
    HOMEBREW_VERSION: 0.8.1
    HEAD: (none)
    HOMEBREW_PREFIX: /usr/local
    HOMEBREW_CELLAR: /usr/local/Cellar
    Hardware: quad-core 64-bit sandybridge
    OS X: 10.7.3
    Kernel Architecture: x86_64
    Xcode: 3.2.2
    GCC-4.0: N/A
    GCC-4.2: N/A
    LLVM: build 2336
    Clang: N/A
    MacPorts or Fink? false
    X11: /usr/X11
    System Ruby: 1.8.7-249
    /usr/bin/ruby => /Sy
    /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
    Which Perl:   /usr/bin/perl
    Which Python: /usr/bin/python
    Which Ruby:   /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
    ==> Build Flags
    CC: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
    CXX: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ => /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
    LD: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
    CFLAGS: -Os -w -pipe -march=native -Qunused-arguments
    CXXFLAGS: -Os -w -pipe -march=native -Qunused-arguments
    MAKEFLAGS: -j4

    Error: Failed executing: ./configure --disable-debug --prefix=/usr/local/Cellar/wget/1.13.4 --sysconfdir=/usr/local/etc --with-ssl=openssl --disable-iri
    If `brew doctor' does not help diagnose the issue, please report the bug:
        https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue
    We saved the configure log, please gist it if you report the issue:
        ~/Library/Logs/Homebrew/config.log

Please help me to fix this. I have installed the new OS and xcode 4.3.

请帮我解决这个问题。我已经安装了新的操作系统和 xcode 4.3。

回答by mxcl

You need to install the CLI tools. Open Preferences in Xcode, go to Downloads and install the "Command Line Tools".

您需要安装 CLI 工具。在 Xcode 中打开首选项,转到下载并安装“命令行工具”。

回答by Thiago Valentim

You need to add the Command Line Developer Tools Package, then this can easily be done via terminal:

您需要添加命令行开发人员工具包,然后可以通过终端轻松完成:

xcode-select --install