hamburger-tech-nits

主にプログラミングのNITSな話

複数バージョンのXcodeをインストールしているMacでCommandLineToolsのバージョンを切り替える

とあるツールのインストール中。

$ brew install tool 
Error: Your Xcode (13.4.1 => /Applications/Xcode13.4.1.app/Contents/Developer) is too outdated.
Please update to Xcode 14.3 (or delete it).
Xcode can be updated from the App Store.

業務の都合上複数バージョンのXcodeを利用していて、今使っているメインは13.4.1。新しいバージョンを見るようにすれば解決しそうだなと思いながら調査開始。

$  xcode-select -v
xcode-select version 2397.

$ xcodebuild -version
Xcode 13.4.1
Build version 13F100

13.4.114.3に変更すべく、パスを指定する。

$ sudo xcode-select -s /Applications/Xcode14.3.app/Contents/Developer
Password:

無事解決した