Solvedbrew Homebrew does not work on Big Sur (10.16/11.0)

  • [ x] ran brew update and can still reproduce the problem?
  • [ x] ran brew doctor, fixed all issues and can still reproduce the problem?
  • [ x] ran brew config and brew doctor and included their output with your issue?

What you were trying to do (and why)

Trying to install any software using homebrew on Big Sur 10.16 beta 1

What happened (include command output)

always the following error, irrespective of package install

Command output
==> Downloading https://ftp.gnu.org/gnu/emacs/emacs-26.3.tar.xz
######################################################################## 100.0%
Error: An exception occurred within a child process:
  NoMethodError: undefined method `path' for nil:NilClass
Did you mean?  paths
  

What you expected to happen

install to complete

Step-by-step reproduction instructions (by running brew commands)

brew install emacs

Output of brew config and brew doctor commands

brew config
HOMEBREW_VERSION: 2.4.1
ORIGIN: https://github.com/Homebrew/brew
HEAD: a89b56598bf2334bf53fb9e55694551ecf680916
Last commit: 28 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 3abba3ee9598c926176611b95fd4282e73fc8e31
Core tap last commit: 2 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_GITHUB_API_TOKEN: set
HOMEBREW_MAKE_JOBS: 4
CPU: quad-core 64-bit broadwell
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
Clang: 11.0 build 1103
Git: 2.27.0 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 1.8.0_141
macOS: 10.16-x86_64
CLT: 11.0.33.17
Xcode: 11.5

brew doctor
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Some installed formulae were deleted!
You should find replacements for the following formulae:
  python@2
  php@5.6

Warning: Some installed formulae are deprecated or disabled.
You should find replacements for the following formulae:
  go@1.9

Warning: Some installed formulae are not readable:
  php@5.6: "cxx11" is not a recognized standard

Warning: You are using macOS 10.16.
We do not provide support for this pre-release version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or IRC. You are responsible for resolving any issues you
experience while you are running this pre-release version.
27 Answers

✔️Accepted Answer

In addition to installing XCode 12.2, I had to

sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk /Library/Developer/CommandLineTools/SDKs/MacOSX10.16.sdk
sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk /Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk

to get brew upgrade/brew install to work on Big Sur. I could not track down where in the Homebrew env checks source
it verifies that an SDK for the current OS version exists, but it looks for MacOSX{version}.sdk under /Library/Developer/CommandLineTools/SDKs/. The actual Big Sur SDK is under /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk.

HTH.

Other Answers:

Use CLI Tools for XCode beta 5. CLT for GM does not work with brew.

I've installed Command Line Tools for Xcode 12 beta from https://developer.apple.com/download/more/ and now brew is working !

I got it on my iMac and Macbook Pro, both run brew flawlessly for now. I just had to install CLI Tools too.

EDIT: CLI Tools can, as always, be downloaded here

Symlinking works for me with BigSur beta 7 and Xcode 12 GM and Xcode CLT 12 GM. Thanks for this tip @michaelklishin

More Issues: