Build and install Brew apps that are x86_64 instead of i386?

后端 未结 2 1679
温柔的废话
温柔的废话 2021-01-18 05:51

After I have done this:

brew install git

I do this:

which git

which returns:

<
相关标签:
2条回答
  • 2021-01-18 05:59

    Try with

    xcode-select --install
    
    0 讨论(0)
  • 2021-01-18 06:13

    This has been solved.

    I installed Xcode 4.3.2 via the App Store and installed the Command Line Tools, but I had an existing Xcode 3.1 installed from years ago. I Googled around and found these commands:

    sudo /Developer/Library/uninstall-devtools –mode=all
    
    sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
    

    That cured my problem and after I did that the compilers changed for brew:

    $ brew --env
    CC: /usr/bin/clang
    CXX: /usr/bin/clang++ => /usr/bin/clang
    LD: /usr/bin/clang
    CFLAGS: -Os -w -pipe -march=native -Qunused-arguments
    CXXFLAGS: -Os -w -pipe -march=native -Qunused-arguments
    MAKEFLAGS: -j4
    

    brew installs are much better now:

    $ which git
    /usr/local/bin/git
    
    $ file /usr/local/bin/git
    /usr/local/bin/git: Mach-O 64-bit executable x86_64
    
    0 讨论(0)
提交回复
热议问题