这就是我的机器上显示的内容:
clang --version
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
which clang
/usr/bin/clang
但是我的应用程序要求我使用Clang 9,如何将其安装在OS X上?
我尝试使用
brew install llvm@9
但是没有运气,这是输出:
brew install llvm@9
Updating Homebrew...
==> Auto-updated Homebrew!
Updated 3 taps (homebrew/core, homebrew/cask and caskroom/versions).
==> Updated Formulae
glib-networking ✔ wget ✔ asdf atomist-cli cake cgal confluent-oss dhall dhall-json embulk get_iplayer gocr hadolint jenkins juju logtalk mps-youtube sdl ssllabs-scan taskell xmake
Error: No available formula with the name "llvm@9"
==> Searching for a previously deleted formula (in the last month)...
Warning: homebrew/core is shallow clone. To get complete history run:
git -C "$(brew --repo homebrew/core)" fetch --unshallow
Error: No previously deleted formula found.
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching taps...
==> Searching taps on GitHub...
Error: No formulae found in taps.
我可能不应该首先尝试该命令,因为我要安装的是Clang 9,而不是LLVM。读this post有助于我理解什么是LLVM。