如何更改xcrun指向的目录?目前正指向
xcrun:错误:无法统计活动的Xcode路径'/Volumes/Xcode/Xcode44-DP7.app/Contents/Developer'.(没有相应的文件和目录)
我需要改变位置.谢谢.
Vai*_*ran 184
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
Run Code Online (Sandbox Code Playgroud)
Rob*_*ier 45
使用xcode-select -switch
来选择你默认情况下使用其的Xcode版本.
imx*_*ylz 16
sudo xcode-select --switch /Library/Developer/CommandLineTools
Run Code Online (Sandbox Code Playgroud)
小智 14
在我的情况下,我不得不:
如果您运行此命令:
$ xcode-select -p
Run Code Online (Sandbox Code Playgroud)
它将打印到屏幕如下:
/Volumes/Xcode/Xcode44-DP7.app/Contents/Developer(在您的情况下)
要将其更改为默认值,您可以执行以下操作:
$ sudo xcode-select -r
Password:
Run Code Online (Sandbox Code Playgroud)
再检查一遍:
$ xcode-select -p
/Applications/Xcode.app/Contents/Developer
Run Code Online (Sandbox Code Playgroud)
获取更多信息:
$ 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
Run Code Online (Sandbox Code Playgroud)
或者,改为覆盖DEVELOPER_DIR环境变量:
export DEVELOPER_DIR="/Applications/Xcode.app/Contents/Developer"
Run Code Online (Sandbox Code Playgroud)
此设置对每个用户帐户都是唯一的.如果存在,它将覆盖xcode-select
选择.
可选:您可以通过编辑.bash_profile文件在登录会话之间保持此状态.
归档时间: |
|
查看次数: |
51730 次 |
最近记录: |