Homebew on macOS Big Sur 兼容性问题

2020-11-16 14:12:28 +08:00
 jaylee4869

最近刚升级了 mac,在使用 homebrew 的时候会提醒:

Warning: You are using macOS 11.0.
We do not provide support for this released but not yet supported version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or any other official channels. You are responsible for
resolving any issues you experience while you are running this
released but not yet supported version.

尝试安装某个命令行工具的时候会报错:

Error: Your CLT does not support macOS 11.0.
It is either outdated or was modified.
Please update your CLT or delete it if no updates are available.
Error: An exception occurred within a child process:
SystemExit: exit

在社区的搜索结果:

https://github.com/GoogleContainerTools/kpt/issues/962 和我一样的问题

https://discourse.brew.sh/t/macos-big-sur-issue/8407 同上

https://github.com/Homebrew/brew/issues/7857 说由于 CI 环境缺失最近几个不会支持 arm 下的 homebrew

p.s.: 机器是 Intel CPU.

4813 次点击
所在节点    Homebrew
6 条回复
GTD
2020-11-17 13:26:53 +08:00
我也是这样,看见这个真闹心,还是用 apfs snapshot 回退到没有 homebrew 的状态,等新版本出来了再安装吧。再等等了
dingdayu
2020-11-17 16:44:19 +08:00
如果仅仅是上面的提示,你可以通过更新 Xcode 12.2 来解决(请在安装后,手动打开一次,会提示安装 Xcode Tools ),如果更新 Xcode 不能够解决你的问题,那么请看下面的方案:

1. 更新 Command Line Tools

```bash
softwareupdate --all --install --force
```

> 由于你刚更新的 xcode,不出意外会提示,没有可用的更新:`No new software available.`

2. 手动移除 CommandLineTools,然后重新安装:

```bash
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
```

执行成功后,可以通过下面的命令,查询版本:

```bash
xcodebuild -version
```

通过以上两个方案,大概率你已经解决你所遇到的问题,如果还没有解决,希望 `brew doctor` 能够给你帮助。
dingdayu
2020-11-17 16:45:44 +08:00
@dingdayu 如果你不想安装那么大的 xcode,或许方法 2,可以直接解决问题。
jaylee4869
2020-11-17 18:02:23 +08:00
@dingdayu 好诡异,都是 12.2,文件签名也一样,删除后重新安装就好了!
WallaceYYLi
2020-11-19 12:13:11 +08:00
擦,我也是一样,删除重新安装后就莫名其妙好了😓
limao
2020-11-20 09:33:01 +08:00
@dingdayu 谢谢,正常更新了

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/725768

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX