2012-09-11 28 views
5

根據Kenneth Reitz的建議,我在我的MAC OS X 10.7.4上安裝了「xcode-lite」(即用於xcode的命令行工具(CLT))。brew install macvim不適用於「xcode-lite」,即xcode的命令行工具?

然而,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. 

我沒有xcodebuild/Applications下。我也沒有/Developer目錄。我有它在/usr/bin/xcodebuild,但

xcode-select -switch /usr/bin 
brew install macvim 

給了我這個錯誤:

Error: Can't run /usr/bin/usr/bin/xcodebuild (no such file). 

此外,試圖迫使它來尋找xcodebuild/usr/bin使得沖泡掛下去。所以我被卡住了。

我在一些地方看過CLT for xcode不夠好,我需要下載完整版本的xcode(1.5GB)。其他一些人聲稱brew的確可以與CLT一起使用xcode,但數小時嘗試brew install macvim(以及大量的谷歌搜索)並沒有產生任何結果。我必須錯過關於brew和CLT for xcode的基本知識。我真的需要全面的xcode還是我的CLT for xcode沒有安裝在正確的目錄中?

ps:我想釀造它而不是安裝二進制目錄的原因是因爲我想用python開發功能來構建它。如果有一種更簡單的方法可以通過python-dev集成來獲取macvim,我很樂意繼續這樣做。

+0

一臺筆記本電腦升級到山獅,我們無法得到這個工作爲目的相同的前世(蘋果CLT之前)之後:macvim;最終放棄並安裝Xcode,這樣我們就可以繼續工作。 – cfeduke

+0

是否有特殊原因需要通過自制軟件安裝macvim而不是dmg或從源代碼構建? – Conner

+0

Conner,我的錯 - 我忘了在我的文章中提到這個:我想釀造它而不是安裝二進制目錄的原因是因爲我想用python開發功能來構建它。如果有一種更簡單的方法可以通過python-dev集成來獲取macvim,我很樂意繼續這樣做。 – Ashwin

回答

2

我下載了完整版本的xcode(差不多2GB),然後brew安裝了macvim。很不幸,這個brew不適用於xcode的CLT。

我後來遇到了一些小問題。一個問題是,當我需要它與我下載的版本(2.7.3)一起工作時,macvim選擇了python的系統版本(2.7.1)。我不得不釀造刪除macvim,brew編輯macvim,使macvim引用正確的python版本,並用brew安裝python重新編譯。我不得不說這是一個艱難的練習!但現在我有macvim在python開發中運行良好

0

就像@LloydDewolf提到的那樣,需要完整安裝Xcode。除非你需要macvim的brew版本特定的東西(比如python開發特性),否則你可以從.dmg或源代碼安裝。

[email protected]:~$ 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. 

這涉及到以下開放GitHub的問題:https://github.com/mxcl/homebrew/issues/15111