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

问题:

升级mac系统后,brew与mac版本不兼容,报错如下:
brew报错:in `initialize‘: Version value must be a string; got a NilClass () (TypeError)

解决方法:

  1. 打开报错的文件:
vim /usr/local/Homebrew/Library/Homebrew/version.rb
  1. 如图,注释掉368和370行,写入@version = '11.1’将版本号固定。brew报错:in `initialize‘: Version value must be a string; got a NilClass () (TypeError)
上一篇:mac_m1编程环境搭建以及适配情况总结


下一篇:Mongo DB-0