2016-04-29 162 views
2

我試圖在OS X v10.11上安裝Qt。我正在使用安裝程序qt-unified-mac-x64-2.0.3-online。它現在顯示一張表:在OS X上安裝Qt Creator

您需要安裝Xcode版本5.0.0。從https://developer.apple.com/xcode

試圖以關閉片(按壓 「OK」)使其再現
下載的Xcode。

當前版本的Xcode是7.3。盡我所知,它只能通過App Store獲得,因此只能下載最新版本。

This page 6個月前宣稱不支持Xcode 7。然而,該頁面引用this page作爲源,並且該源頁面僅表示需要Clang。 「Xcode」不會出現在頁面上。

我有鏘:

$ which clang 
/usr/bin/clang 

$ clang -v 
Apple LLVM version 7.3.0 (clang-703.0.29) 
Target: x86_64-apple-darwin15.4.0 
Thread model: posix 
InstalledDir: /Library/Developer/CommandLineTools/usr/bin 

...但Qt的在線安裝程序不會讓我繼續。

我需要在OS X上安裝以獲得Qt Creator安裝和運行的最低軟件是什麼?


更新:我張貼了這個問題,按下 「OK」 大約4次。發佈問題後,我大約再次按下「OK」約5次。最終,它消失了,並允許繼續安裝。 (!)

但是,當我嘗試構建項目時,Qt Creator抱怨「Xcode設置不正確,您可能需要通過運行/usr/bin/xcodebuild來確認許可協議。」

運行該命令顯示:

xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer 
directory '/Library/Developer/CommandLineTools' is a command line tools instance 

所以它看起來像我確實需要的Xcode。

回答

2

我也有這個問題。看來我也安裝了XCode命令行工具,並且有一種方法可以在它們之間進行選擇:

$ xcodebuild 
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance 

$ xcode-select -p # Print currently selected xcode tools 
/Library/Developer/CommandLineTools 

$ sudo xcode-select -s /Applications/Xcode.app # Select the XCode app. 

之後,它工作。