Mac安装git,使用时提示 cannot run git xcode-select: note: no developer tools were found, requesting install.

1. 苹果升级了系统到10.13,导致git不能使用,报以下错误

no developer tools were found at ‘/Applications/Xcode.app’, requesting install. Choose an option in the dialog to download the command line developer tools.

然后,会点击安装xcode,这个xcode内容有很多,将近5个g,实际上只需要装Command_Line_Tools_macOS_10.13_for_Xcode 就可以了,大小大概189MB, 去苹果的开发者官网就可以下载了,地址 https://developer.apple.com/download/more/

Mac安装git,使用时提示 cannot run git xcode-select: note: no developer tools were found, requesting install.


2. 在app store下载了最新的macOS High Sierra系统,安装时报错”将安装器信息下载到目标宗卷失败。“

解决这个也很简单,关闭wifi,再打开wifi就行了,没必要去苹果官网重新下载系统搞一遍。