MAC 升级到10.14 mojave beta之后git无法使用解决方案

MAC 升级到10.14 mojave之后git无法使用解决方案

这几天google用不了只能靠百度了,首先查到原因是因为每次大版本升级之后,xcode会被卸载,而我本来就没有想xcode,又了解了一下,不是xcode而是CommandLineTools,跟xcode有一定关系,git这种命令行工具依赖于CommandLineTools。
于是按照教程执行
`xcode-select --install
然而安装的时候提示服务器上找不到软件,这beta版还真是够beta的。
继续百度,找到一博客说重新安装最新版xcode(上面一条命令安装的时候是会弹出安装xcode的选项的),于是乎安装xcode,居然有5个多G,安装好之后再执行上面命令,依然不行。
本来打算放弃,等更新的,后来实在不方便又搜了一下,想看看能不能手动安装CommandLineTools,然后在V2EX上找到一句有用的话
安装 brew 后执行 brew doctor 命令后会自动提示你安装的
执行brew doctor之后果然出来很多warning,截取其中一段

Warning: Xcode alone is not sufficient on Dunno.
Install the Command Line Tools:
  xcode-select --install


Warning: Ruby version 2.3.6 is unsupported on 10.14. Homebrew
is developed and tested on Ruby 2.3.3, and may not work correctly
on other Rubies. Patches are accepted as long as they don't cause breakage
on supported Rubies.

Warning: Your Xcode is configured with an invalid path.
You should change it to the correct path:
  sudo xcode-select -switch /Applications/Xcode.app

其中的sudo xcode-select -switch /Applications/Xcode.app命令看起来像是这个问题的解决方案,执行之后果然git恢复了,找时间再把臃肿的xcode卸载掉

2018.06.11更新:
不知道什么时候又用不了了,然后XCODE也不见了,没了xcode上面那个方法也不行了,于是又重新下载安装了一遍xcode,安装完之后git直接就能用了。
另外TftpServer的GUI版不好用了,不知道跟这个有没有关系。,

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值