Question
Homebrew reports an error after upgrading MacOS to Big Sur, as follows:
$ brew
Traceback (most recent call last):
23: from /usr/local/Library/Homebrew/brew.rb:6:in `<main>'
22: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
21: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
20: from /usr/local/Library/Homebrew/global.rb:3:in `<top (required)>'
19: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
18: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
17: from /usr/local/Library/Homebrew/extend/pathname.rb:4:in `<top (required)>'
16: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
15: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
14: from /usr/local/Library/Homebrew/utils.rb:2:in `<top (required)>'
13: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
12: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
11: from /usr/local/Library/Homebrew/emoji.rb:24:in `<top (required)>'
10: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
9: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
8: from /usr/local/Library/Homebrew/extend/os/emoji.rb:1:in `<top (required)>'
7: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
6: from /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/2.6.0/rubygems/core_ext/kernel_require.rb:54:in `require'
5: from /usr/local/Library/Homebrew/os.rb:1:in `<top (required)>'
4: from /usr/local/Library/Homebrew/os.rb:18:in `<module:OS>'
3: from /usr/local/Library/Homebrew/os/mac.rb:21:in `version'
2: from /usr/local/Library/Homebrew/os/mac.rb:21:in `new'
1: from /usr/local/Library/Homebrew/os/mac/version.rb:26:in `initialize'
/usr/local/Library/Homebrew/version.rb:198:in `initialize': Version value must be a string; got a NilClass () (TypeError)
terms of settlement
Modify the/usr/local/library/homebrew/version.rb file and change @ version in the initialize function to a specific value, such as:
def initialize(val)
if val.respond_to?(:to_str)
@version = val.to_str
else
raise TypeError, "Version value must be a string; got a #{val.class} (#{val})"
end
end
Change to
def initialize(val)
if val.respond_to?(:to_str)
@version = '10.15.7'
else
raise TypeError, "Version value must be a string; got a #{val.class} (#{val})"
end
end
Read More:
- How to Solve MacOS Big Sur MySQL workbench flashback problem
- MacBook M1 Big Sur logging into forticlient SSL VPN
- macOS Install Homebrew Error LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
- After upgrading windows 11, Wireshark can’t get list of interfaces: packetgetadapternames reports an error
- Does flutter report an error after upgrading 2.5?
- The echots in Vue reports an error. After obtaining the DOM element, the chart can be displayed. The console still reports an error
- Hadoop reports an error. Cannot access scala.serializable and python MapReduce reports an error
- HTML method IE8 reports an error, IE8 jQuery Ajax obtains static resources reports an error, typeerror denies access
- The file server reports an error of 413, and the file uploaded by nginx reports an error of 413 request entity too large
- Lamdba in the studio part reports an error. Observe lamdba reports an error but can run
- An error occurred when MySQL backup with mysqldump instruction in MacOS system
- After upgrading php7, PHP program prompts an error: operator not supported for strings in causes and Solutions
- Mac installation opencv brew tap homebrew / Science
- Error: Could not link: /usr/local/share/doc/homebrew
- The idea code pushes to GitHub and reports an error fatal: unable to access
- Unit Android converts c# class to JSON file and reports an error
- Spring cloud is a big hole. Failed to start bean ‘eurekaAutoServiceRegistration’
- QT + MySQL generates an EXE file and reports an error “driver not loaded”. Solution steps
- Vue agent reports an Error 404 nginx configuration method
- How to Solve MacOS ffmpeg killed Error