Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
sudo xcode-select -switch /Applications/Xcode.app 命令不起作用,我安装了 OS Sierra 和 Xcode 8。我要么没有得到回复,命令移动到下一行,要么我得到一个错误。请帮助我想更改目录
您需要以xcode-selectroot 身份运行。因此,只需在终端中执行以下命令:
xcode-select
sudo xcode-select -s "/Applications/Xcode.app"
检查 DEVELOPER_DIR 环境变量的设置。你可能会超越它。通过以下方式了解:
回声 $DEVELOPER_DIR
在你的 ~/.bash_profile 添加:
导出 DEVELOPER_DIR=/Applications/Xcode.app
在https://forums.developer.apple.com/thread/13629中找到了答案