MacOs11.0-brew报错“in `initialize‘: Version value must be a string; got a NilClass () (TypeError)”解决方法

时间:2024-03-23 20:11:44

MacOs11.0-brew报错“in `initialize’: Version value must be a string; got a NilClass () (TypeError)”解决方法

报错

MacOs11.0-brew报错“in `initialize‘: Version value must be a string; got a NilClass () (TypeError)”解决方法

原因

Brew仅支持macOs的公开发行版,若为beta版则无法使用

解决方法

  1. 安装最新版本的Command Line tools, 前往https://developer.apple.com/download/more/下载

MacOs11.0-brew报错“in `initialize‘: Version value must be a string; got a NilClass () (TypeError)”解决方法

  1. 前往报错的路径/usr/local/Homebrew/Library/Homebrew/version.rb:368 并将version写死

@version = '10.14.1'

MacOs11.0-brew报错“in `initialize‘: Version value must be a string; got a NilClass () (TypeError)”解决方法

参考文章

brew报错:`initialize’: Version value must be a string; got a NilClass () (TypeError)