Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Homebrew fails on MacOS 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 

After I run brew list, I get the following error

~ 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) 

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?

like image 620
ajay Avatar asked Nov 13 '20 13:11

ajay


People also ask

What does Brew update reset do?

brew/Library/Homebrew/cmd/update-reset.sh this will destroy all your uncommitted or committed changes. # speedup when using Git repeatedly and prevent errors if the shim changes mid-update.

Will brew work on macOS Big Sur?

Now brew should work just fine under macOS Big Sur! [email protected]: Permission denied (publickey). fatal: Could not read from remote repository.

Why can't I install homebrew on my Mac?

If your Mac uses the Apple Silicon (M1 Chip), you will have a problem with the installation till the date of publication of this article. You can read in this another article how to solve the issue of Homebrew that doesn't run on the M1 chip.

What version of Xcode is supported on Big Sur?

but running this on Big Sur, with the latest version of Xcode (12.2) installed via the App Store will throw this error: Your CLT does not support macOS 11.0 Log into Apple’s Developer Site and download the beta of Xcode, version 12.3 as of this writing.

Should I run Brew update or brew update first?

5 If you run brew upgradestill meet the error, maybe you should run brew updatefirst. My experience is: 1. brew update 2. brew doctor 3. brew upgrade Share Improve this answer Follow answered Nov 16 '20 at 6:06 TerryTerry 5111 bronze badge 1 1 Warning: You are using macOS 11.0.


2 Answers

You should update brew;

brew update-reset 
like image 82
夏溪辰 Avatar answered Oct 08 '22 11:10

夏溪辰


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

brew upgrade 
like image 40
andrmu Avatar answered Oct 08 '22 12:10

andrmu