我正在尝试从命令行更新Xcode。一开始我试着跑步:
xcode-select --install
这就产生了这条信息:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
那么问题来了,有没有办法从命令行更新Xcode呢?
我正在尝试从命令行更新Xcode。一开始我试着跑步:
xcode-select --install
这就产生了这条信息:
xcode-select: error: command line tools are already installed, use "Software Update" to install updates
那么问题来了,有没有办法从命令行更新Xcode呢?
当前回答
对于那些在更新到卡特琳娜后有此问题的人,只需在您的终端上执行此命令
sudo rm -rf /Library/Developer/CommandLineTools; xcode-select --install;
其他回答
当我卸载完整版本的Xcode以重新安装CLI版本时,我遇到了同样的问题。我的解决方案是:
sudo xcode-select -s /Library/Developer/CommandLineTools
$ sudo rm -rf /Library/Developer/CommandLineTools
$ xcode-select --install
我也遇到过同样的问题,我采取了以下方法:
删除旧的工具($ sudo rm -rf /Library/Developer/CommandLineTools) 重新安装xcode命令行工具($ xcode-select——Install)
完成这些步骤后,您将看到一个弹出窗口来安装新版本的工具。
我不知道为什么这对我来说如此棘手。
sudo xcode-select --install
什么也没为我做。
softwareupdate --all --install --force
什么也没为我做。
我必须按照下面的顺序做事
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
这安装了一个更新的xcode,但不是最新的。
然后我做了
softwareupdate --all --install --force
他们完全更新了。
我试图使用React-Native Expo应用程序与create-react-native-app,但出于某种原因,它会启动我的模拟器,只是挂起而不加载应用程序。ipinak上面的答案重置Xcode CLI工具,因为试图更新到最新的Xcode CLI无法工作。这两条命令是:
rm -rf /Library/Developer/CommandLineTools
xcode-select --install
由于下载,这个过程需要时间。 我把这个留在这里,任何其他都会搜索这个特定的React-Native Expo修复。