brew错误 `block in from_symbol': unknown or unsupported macOS version: :dunno (MacOSVersionError) 解决方法
3871 ·
1 ·
2021-12-01 00:09:18
最新编辑原因:

先说解决方法,执行下面命令即可:

brew update-reset

具体异常

runkangyang@RunkangdeMacBook-Pro ~ % brew

/usr/local/Homebrew/Library/Homebrew/os/mac/version.rb:33:in `block in from_symbol': unknown or unsupported macOS version: :dunno (MacOSVersionError)

from /usr/local/Homebrew/Library/Homebrew/os/mac/version.rb:33:in `fetch'

from /usr/local/Homebrew/Library/Homebrew/os/mac/version.rb:33:in `from_symbol'

from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:28:in `version'

from /usr/local/Homebrew/Library/Homebrew/os/mac.rb:60:in `prerelease?'

from /usr/local/Homebrew/Library/Homebrew/os.rb:43:in `<module:OS>'

from /usr/local/Homebrew/Library/Homebrew/os.rb:7:in `<top (required)>'

from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'

from /usr/local/Homebrew/Library/Homebrew/global.rb:80:in `<top (required)>'

from /usr/local/Homebrew/Library/Homebrew/brew.rb:31:in `require_relative'

from /usr/local/Homebrew/Library/Homebrew/brew.rb:31:in `<main>'

 


本作品系原创,采用《署名-非商业性使用-禁止演绎4.0 国际》许可协议.转载请说明出处
本文链接:https://www.upupor.com/u/21120100075415580672 复制
评论1
upupor
upupor 楼主
2022-11-07 11:16:03 ·  回复 · 1#

实在不行,可以到brew源码目录重新pull

推荐阅读