我正在尝试从命令行更新Xcode。最初,我尝试运行:
xcode-select --install这导致了这条消息:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates所以问题仍然存在,有没有一种方法可以从命令行更新Xcode?
发布于 2018-01-07 12:57:29
当我卸载完整版本的Xcode以重新安装CLI版本时,我遇到了同样的问题。我的解决方案是:
sudo xcode-select -s /Library/Developer/CommandLineTools
发布于 2019-02-01 20:35:24
安装命令行工具(使用xcode-select --install)后,键入:
sudo xcode-select --switch /Library/Developer/CommandLineTools/你现在应该可以运行git了:
10:29 $ git --version
git version 2.17.2 (Apple Git-113)发布于 2017-11-16 04:12:40
在删除Xcode后,我得到了这个错误。我通过用sudo xcode-select -r重置命令行工具路径修复了这个问题。
之前:
navin@Radiant ~$ /usr/bin/clang
xcrun: error: active developer path ("/Applications/Xcode.app/Contents/Developer") does not exist
Use `sudo xcode-select --switch path/to/Xcode.app` to specify the Xcode that you wish to use for command line developer tools, or use `xcode-select --install` to install the standalone command line developer tools.
See `man xcode-select` for more details.
navin@Radiant ~$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates之后:
navin@Radiant ~$ /usr/bin/clang
clang: error: no input fileshttps://stackoverflow.com/questions/34617452
复制相似问题