Homebrew在MacOS Big Sur上失败 [英] Homebrew fails on MacOS Big Sur

查看:89
本文介绍了Homebrew在MacOS Big Sur上失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从莫哈维(Mohave)升级到大苏尔(Big Sur),发现自制啤酒不再起作用.我使用命令安装了命令行工具

I upgraded from Mohave to Big Sur and found that homebrew is not working any more. I installed the command line tools using the command

xcode-select --install

运行 brew list 后,出现以下错误

~ brew list
Traceback (most recent call last):
    11: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in `<main>'
    10: from /usr/local/Homebrew/Library/Homebrew/brew.rb:23:in `require_relative'
     9: from /usr/local/Homebrew/Library/Homebrew/global.rb:37:in `<top (required)>'
     8: from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
     7: from /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
     6: from /usr/local/Homebrew/Library/Homebrew/os.rb:3:in `<top (required)>'
     5: from /usr/local/Homebrew/Library/Homebrew/os.rb:21:in `<module:OS>'
     4: from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:58:in `prerelease?'
     3: from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:24:in `version'
     2: from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:24:in `new'
     1: from /usr/local/Homebrew/Library/Homebrew/os/mac/version.rb:26:in `initialize'
/usr/local/Homebrew/Library/Homebrew/version.rb:368:in `initialize': Version value must be a string; got a NilClass () (TypeError)

我尝试通过删除文件夹/Library/Developer/CommandLineTools 并安装 Xcode 12.3 beta的命令行工具,但仍然遇到相同的错误.有什么方法可以使冲泡工作吗?

I tried by deleting the folder /Library/Developer/CommandLineTools and installing the Command Line Tools for Xcode 12.3 beta but still I am getting the same error. Is there any way to make brew work?

推荐答案

我遇到了同样的问题.尝试升级brew-这对我来说解决了.

I had the same problem. Try upgrading brew - this solved it for me.

brew upgrade

这篇关于Homebrew在MacOS Big Sur上失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆