[mac开发环境搭建] 令人崩溃的git,需安装xcode-select

最近刚接触mac电脑, 计划搭建下开发环境, 印象中mac电脑自带git。但真实操作给了我重重的一击。
出现报错信息:

xcode-select: note: no developer tools were found at '/applications/xcode.app', 
requesting install. choose an option in the dialog to download the command line developer tools.

网上搜索资料,是因为苹果升级了系统到10.13,导致git不能使用,才会错误。 两种解决方式:

  • 根据弹出框提示, 点击安装xcode,这个xcode内容有很多,将近5G, 速度太慢。
  • Command_Line_Tools_macOS_xx.xx_for_Xcode就可以了,大小大概189MB, 去苹果的开发者官网就可以下载了,地址 https://developer.apple.com/download/more/

然而苹果官网访问速度太慢,开始找是否有人下载好上传到国内的网站上, 幸运的是的确有, 下载网址: https://sourceforge.net/projects/git-osx-installer/

胜利的曙光:

admindeMacBook-Pro:~ admin$ git --version
git version 2.15.0

参考博客:

  • mac os 操作系统安装git报错原因
  • xcode命令行工具下载

你可能感兴趣的:(日常报错整理,mac,os,x,git,xcode)