brew install macvim 不适用于“xcode-lite”,即 xcode 的命令行工具?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12361856/
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
brew install macvim doesn't work with "xcode-lite", i.e., command line tools for xcode?
提问by Ashwin
Upon the advice of Kenneth Reitz, I've installed "xcode-lite" (i.e., Command Line Tools (CLT) for xcode on my MAC OS X 10.7.4).
根据Kenneth Reitz的建议,我在 MAC OS X 10.7.4 上安装了“xcode-lite”(即用于 xcode 的命令行工具 (CLT))。
However, brew install macvim
gives me this error:
但是,brew install macvim
给了我这个错误:
xcode-select: Error: No Xcode is selected. Use xcode-select -switch /Applications/Xcode.app to select /Applications/Xcode.app, or see the xcode-select manpage (man xcode-select) for further information.
I don't have xcodebuild
under /Applications
. Neither do I have a /Developer
directory. I have it at /usr/bin/xcodebuild
, but
我没有xcodebuild
下/Applications
。我也没有/Developer
目录。我有/usr/bin/xcodebuild
,但是
xcode-select -switch /usr/bin
brew install macvim
gives me this error:
给我这个错误:
Error: Can't run /usr/bin/usr/bin/xcodebuild (no such file).
Moreover, trying to force it to look for xcodebuild
in /usr/bin
makes brew hang indefinitely. So I am stuck.
此外,试图强迫它寻找xcodebuild
in/usr/bin
会使 brew 无限期地挂起。所以我被困住了。
I read in a few places that CLT for xcode is not good enough and that I need to download the full version of xcode (1.5GB). Some others claim that brew will indeed work with CLT for xcode, but several hours of trying to brew install macvim
(together with plenty of googling) hasn't yielded any results. I must be missing something fundamental about brew and CLT for xcode. Do I really need the full-blown xcode or is my CLT for xcode not installed in the right directory ?
我在几个地方读到 xcode 的 CLT 不够好,我需要下载完整版的 xcode (1.5GB)。其他一些人声称 brew 确实可以与 xcode 的 CLTbrew install macvim
一起使用,但是几个小时的尝试(连同大量的谷歌搜索)没有产生任何结果。我一定遗漏了一些关于 xcode 的 brew 和 CLT 的基本知识。我真的需要完整的 xcode 还是我的 xcode 的 CLT 没有安装在正确的目录中?
ps: The reason I want to brew it rather than install the binary directory is because I want to build it with python development features. If there's an easier way to get macvim with python-dev integration, I'm happy to go with that.
ps:我之所以要brew它而不是安装二进制目录是因为我想用python开发功能来构建它。如果有更简单的方法来获得 macvim 与 python-dev 集成,我很乐意接受。
回答by Ashwin
I downloaded the full version of xcode (almost 2GB) and then brew install macvim worked. It's unfortunate the brew doesn't work with CLT for xcode.
我下载了完整版的 xcode(将近 2GB),然后 brew install macvim 工作了。不幸的是,brew 不适用于 xcode 的 CLT。
I ran into a few minor issues subsequently. One issue was that macvim was picking up the system version of python (2.7.1) while I needed it to work with the version I had downloaded (2.7.3). I had to brew remove macvim, brew edit macvim, make macvim reference the correct python version and rebuild with brew install python.
后来我遇到了一些小问题。一个问题是 macvim 正在获取 python (2.7.1) 的系统版本,而我需要它来处理我下载的版本 (2.7.3)。我不得不 brew remove macvim,brew edit macvim,让 macvim 引用正确的 python 版本并使用 brew install python 重建。
I must say this has been a difficult exercise ! But now I have macvim working well for python development
我必须说这是一个艰难的练习!但是现在我的 macvim 可以很好地用于 python 开发
回答by Ehtesh Choudhury
Like @LloydDewolf mentioned, a full installation of Xcode is required. Unless you need something specific from the brew version of macvim (like python development features), you can just install from the .dmg or the source.
就像提到的@LloydDewolf 一样,需要完整安装 Xcode。除非您需要 macvim 的 brew 版本中的特定内容(例如 python 开发功能),否则您只需从 .dmg 或源代码安装即可。
user@mac:~$ brew install macvim
Warning: A newer Command Line Tools for Xcode release is available
You should install the latest version from: http://connect.apple.com
A full installation of Xcode.app is required to compile this software.
Installing just the Command Line Tools is not sufficent.
Error: An unsatisfied requirement failed this build.
This is related to the following open github issue: https://github.com/mxcl/homebrew/issues/15111
这与以下开放的 github 问题有关:https: //github.com/mxcl/homebrew/issues/15111