xcrun が指しているディレクトリを変更するにはどうすればよいですか? 現在指している
xcrun: エラー: アクティブな Xcode パス '/Volumes/Xcode/Xcode44-DP7.app/Contents/Developer' を統計できませんでした。(そのようなファイル、又はディレクトリはありません)
場所を変える必要があります。ありがとうございました。
xcrun が指しているディレクトリを変更するにはどうすればよいですか? 現在指している
xcrun: エラー: アクティブな Xcode パス '/Volumes/Xcode/Xcode44-DP7.app/Contents/Developer' を統計できませんでした。(そのようなファイル、又はディレクトリはありません)
場所を変える必要があります。ありがとうございました。
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
デフォルトで使用xcode-select -switch
している Xcode のバージョンを選択するために使用します。
私の場合、私はしなければなりませんでした:
このコマンドを実行すると:
$ xcode-select -p
以下のように画面に出力されます。
/Volumes/Xcode/Xcode44-DP7.app/Contents/Developer (あなたの場合)
デフォルトに変更するには、次のようにします。
$ sudo xcode-select -r
Password:
再び確かめる:
$ xcode-select -p
/Applications/Xcode.app/Contents/Developer
詳細については、次を参照してください。
$ xcode-select
Usage: xcode-select [options]
Print or change the path to the active developer directory. This directory
controls which tools are used for the Xcode command line tools (for example,
xcodebuild) as well as the BSD development commands (such as cc and make).
Options:
-h, --help print this help message and exit
-p, --print-path print the path of the active developer directory
-s <path>, --switch <path> set the path for the active developer directory
-v, --version print the xcode-select version
-r, --reset reset to the default command line tools path
または、代わりに DEVELOPER_DIR 環境変数をオーバーライドします。
export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"
この設定は、各ユーザー アカウントに固有です。xcode-select
存在する場合は、選択をオーバーライドします。
オプション: .bash_profile ファイルを編集することで、これをログイン セッション間で持続させることができます。
sudo xcode-select --switch /Library/Developer/CommandLineTools は私にとってはうまくいきます。
参考までに、これで設定を台無しにします:
sw_vers -productVersion | grep -E '^10\.([89]|10)' >/dev/null && bash -c "[ -d /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain ] && sudo -u $(ls -ld /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain | awk '{print $3}') bash -c 'ln -vs XcodeDefault.xctoolchain /Applications/Xcode.app/Contents/Developer/Toolchains/OSX$(sw_vers -productVersion).xctoolchain' || sudo bash -c 'mkdir -vp /Applications/Xcode.app/Contents/Developer/Toolchains/OSX$(sw_vers -productVersion).xctoolchain/usr && for i in bin include lib libexec share; do ln -s /usr/${i} /Applications/Xcode.app/Contents/Developer/Toolchains/OSX$(sw_vers -productVersion).xctoolchain/usr/${i}; done'"