Error not a valid ref refs remotes origin master

Bug report Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly ...

Bug report

Please note we will close your issue without comment if you delete, do not read or do not fill out the issue checklist below and provide ALL the requested information. If you repeatedly fail to use the issue template, we will block you from ever submitting issues to Homebrew again.

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

What you were trying to do (and why)

A fresh install of homebrew on OSX.

What happened (include command output)

Installation hangs with the error:

error: Not a valid ref: refs/remotes/origin/master
fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.

brew update hangs the same error, fwiw. Unsurprising since it appears that /usr/local/bin/brew update --force --quiet appears to be the spot where the installed hangs.

Command output

Kates-Other-MBP% /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Password:
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /usr/sbin/chown Bumpant:admin /usr/local/Homebrew
==> Downloading and installing Homebrew...
HEAD is now at 7242cd647 Merge pull request #10357 from dtrodrigues/andor
error: Not a valid ref: refs/remotes/origin/master
fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
^CFailed during: /usr/local/bin/brew update --force --quiet

What you expected to happen

Successful install without a fatal error.

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

Run the install command on a mac running Mojave 10.14.6

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Output of brew config and brew doctor commands

Brew config

Kates-Other-MBP% brew config
HOMEBREW_VERSION: 2.7.5-74-g7242cd6
ORIGIN: https://github.com/Homebrew/brew
HEAD: 7242cd64743635d13d5f69fa3ae0718b2170e7da
Last commit: 34 minutes ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: (none)
Core tap last commit: never
Core tap branch: HEAD
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 8
Homebrew Ruby: 2.6.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/bin/ruby
CPU: octa-core 64-bit kabylake
Clang: 10.0 build 1001
Git: 2.23.0 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
macOS: 10.14.6-x86_64
CLT: 10.3.0.0.1.1562985497
Xcode: N/A

Brew doctor

Kates-Other-MBP% 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: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
softwareupdate --all --install --force

If that doesn't show you an update run:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install

Alternatively, manually download them from:
https://developer.apple.com/download/more/.

Warning: Unbrewed header files were found in /usr/local/include.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.

Unexpected header files:
/usr/local/include/node/js_native_api.h
/usr/local/include/node/js_native_api_types.h
/usr/local/include/node/libplatform/libplatform-export.h
/usr/local/include/node/libplatform/libplatform.h
/usr/local/include/node/libplatform/v8-tracing.h
/usr/local/include/node/node.h
/usr/local/include/node/node_api.h
/usr/local/include/node/node_api_types.h
/usr/local/include/node/node_buffer.h
/usr/local/include/node/node_object_wrap.h
/usr/local/include/node/node_version.h
/usr/local/include/node/openssl/aes.h
/usr/local/include/node/openssl/archs/BSD-x86/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/BSD-x86/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/BSD-x86/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/BSD-x86/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/BSD-x86/asm/include/progs.h
/usr/local/include/node/openssl/archs/BSD-x86/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/BSD-x86/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/BSD-x86/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/BSD-x86/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/BSD-x86/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/BSD-x86/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/BSD-x86/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/BSD-x86/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/BSD-x86/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/BSD-x86/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/BSD-x86_64/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/asm/include/progs.h
/usr/local/include/node/openssl/archs/BSD-x86_64/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/BSD-x86_64/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/BSD-x86_64/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/VC-WIN32/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/VC-WIN32/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/VC-WIN32/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/VC-WIN32/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/VC-WIN32/asm/include/progs.h
/usr/local/include/node/openssl/archs/VC-WIN32/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/VC-WIN32/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/VC-WIN32/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/VC-WIN32/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/VC-WIN32/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/VC-WIN32/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/VC-WIN32/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/VC-WIN32/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/VC-WIN32/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/VC-WIN32/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/VC-WIN64-ARM/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/VC-WIN64-ARM/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/VC-WIN64-ARM/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/VC-WIN64-ARM/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/VC-WIN64-ARM/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/VC-WIN64A/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/asm/include/progs.h
/usr/local/include/node/openssl/archs/VC-WIN64A/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/VC-WIN64A/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/VC-WIN64A/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/aix-gcc/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/aix-gcc/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/aix-gcc/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/aix-gcc/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/aix-gcc/asm/include/progs.h
/usr/local/include/node/openssl/archs/aix-gcc/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/aix-gcc/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/aix-gcc/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/aix-gcc/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/aix-gcc/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/aix-gcc/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/aix-gcc/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/aix-gcc/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/aix-gcc/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/aix-gcc/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/aix64-gcc/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/aix64-gcc/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/aix64-gcc/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/aix64-gcc/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/aix64-gcc/asm/include/progs.h
/usr/local/include/node/openssl/archs/aix64-gcc/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/aix64-gcc/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/aix64-gcc/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/aix64-gcc/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/aix64-gcc/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/aix64-gcc/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/aix64-gcc/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/aix64-gcc/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/aix64-gcc/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/aix64-gcc/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/asm/include/progs.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/darwin-i386-cc/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/asm/include/progs.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/darwin64-x86_64-cc/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-aarch64/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-aarch64/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-aarch64/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-aarch64/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-aarch64/asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-aarch64/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-aarch64/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-aarch64/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-aarch64/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-aarch64/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/linux-aarch64/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-aarch64/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-aarch64/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-aarch64/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-aarch64/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-armv4/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-armv4/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-armv4/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-armv4/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-armv4/asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-armv4/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-armv4/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-armv4/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-armv4/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-armv4/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/linux-armv4/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-armv4/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-armv4/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-armv4/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-armv4/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-elf/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-elf/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-elf/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-elf/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-elf/asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-elf/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-elf/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-elf/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-elf/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-elf/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/linux-elf/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-elf/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-elf/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-elf/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-elf/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-ppc/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-ppc/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-ppc/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-ppc/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc/asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-ppc/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-ppc/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-ppc/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-ppc/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/linux-ppc/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-ppc/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-ppc/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-ppc/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-ppc64/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-ppc64/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc64/asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-ppc64/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-ppc64/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc64/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/linux-ppc64/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-ppc64/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc64/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-ppc64le/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-ppc64le/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/linux-ppc64le/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-ppc64le/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-x32/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-x32/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-x32/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-x32/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-x32/asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-x32/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-x32/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-x32/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-x32/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-x32/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/linux-x32/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-x32/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-x32/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-x32/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-x32/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-x86_64/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-x86_64/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-x86_64/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-x86_64/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-x86_64/asm/include/progs.h
/usr/local/include/node/openssl/archs/linux-x86_64/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-x86_64/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-x86_64/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-x86_64/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-x86_64/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/linux-x86_64/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux-x86_64/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux-x86_64/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux-x86_64/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux-x86_64/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/linux32-s390x/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux32-s390x/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux32-s390x/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux32-s390x/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux32-s390x/asm/include/progs.h
/usr/local/include/node/openssl/archs/linux32-s390x/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux32-s390x/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux32-s390x/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux32-s390x/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux32-s390x/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/linux32-s390x/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux32-s390x/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux32-s390x/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux32-s390x/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux32-s390x/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/linux64-mips64/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux64-mips64/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux64-mips64/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux64-mips64/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux64-mips64/asm/include/progs.h
/usr/local/include/node/openssl/archs/linux64-mips64/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux64-mips64/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux64-mips64/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux64-mips64/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux64-mips64/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/linux64-mips64/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux64-mips64/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux64-mips64/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux64-mips64/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux64-mips64/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/linux64-s390x/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux64-s390x/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux64-s390x/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux64-s390x/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux64-s390x/asm/include/progs.h
/usr/local/include/node/openssl/archs/linux64-s390x/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux64-s390x/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux64-s390x/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux64-s390x/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux64-s390x/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/linux64-s390x/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/linux64-s390x/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/linux64-s390x/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/linux64-s390x/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/linux64-s390x/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/asm/include/progs.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/solaris-x86-gcc/no-asm/include/progs.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/asm/include/progs.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/asm_avx2/crypto/buildinf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/asm_avx2/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/asm_avx2/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/asm_avx2/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/asm_avx2/include/progs.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/no-asm/crypto/buildinf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/no-asm/crypto/include/internal/bn_conf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/no-asm/crypto/include/internal/dso_conf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/no-asm/include/openssl/opensslconf.h
/usr/local/include/node/openssl/archs/solaris64-x86_64-gcc/no-asm/include/progs.h
/usr/local/include/node/openssl/asn1.h
/usr/local/include/node/openssl/asn1_mac.h
/usr/local/include/node/openssl/asn1err.h
/usr/local/include/node/openssl/asn1t.h
/usr/local/include/node/openssl/async.h
/usr/local/include/node/openssl/asyncerr.h
/usr/local/include/node/openssl/bio.h
/usr/local/include/node/openssl/bioerr.h
/usr/local/include/node/openssl/blowfish.h
/usr/local/include/node/openssl/bn.h
/usr/local/include/node/openssl/bn_conf.h
/usr/local/include/node/openssl/bn_conf_asm.h
/usr/local/include/node/openssl/bn_conf_no-asm.h
/usr/local/include/node/openssl/bnerr.h
/usr/local/include/node/openssl/buffer.h
/usr/local/include/node/openssl/buffererr.h
/usr/local/include/node/openssl/camellia.h
/usr/local/include/node/openssl/cast.h
/usr/local/include/node/openssl/cmac.h
/usr/local/include/node/openssl/cms.h
/usr/local/include/node/openssl/cmserr.h
/usr/local/include/node/openssl/comp.h
/usr/local/include/node/openssl/comperr.h
/usr/local/include/node/openssl/conf.h
/usr/local/include/node/openssl/conf_api.h
/usr/local/include/node/openssl/conferr.h
/usr/local/include/node/openssl/crypto.h
/usr/local/include/node/openssl/cryptoerr.h
/usr/local/include/node/openssl/ct.h
/usr/local/include/node/openssl/cterr.h
/usr/local/include/node/openssl/des.h
/usr/local/include/node/openssl/dh.h
/usr/local/include/node/openssl/dherr.h
/usr/local/include/node/openssl/dsa.h
/usr/local/include/node/openssl/dsaerr.h
/usr/local/include/node/openssl/dso_conf.h
/usr/local/include/node/openssl/dso_conf_asm.h
/usr/local/include/node/openssl/dso_conf_no-asm.h
/usr/local/include/node/openssl/dtls1.h
/usr/local/include/node/openssl/e_os2.h
/usr/local/include/node/openssl/ebcdic.h
/usr/local/include/node/openssl/ec.h
/usr/local/include/node/openssl/ecdh.h
/usr/local/include/node/openssl/ecdsa.h
/usr/local/include/node/openssl/ecerr.h
/usr/local/include/node/openssl/engine.h
/usr/local/include/node/openssl/engineerr.h
/usr/local/include/node/openssl/err.h
/usr/local/include/node/openssl/evp.h
/usr/local/include/node/openssl/evperr.h
/usr/local/include/node/openssl/hmac.h
/usr/local/include/node/openssl/idea.h
/usr/local/include/node/openssl/kdf.h
/usr/local/include/node/openssl/kdferr.h
/usr/local/include/node/openssl/lhash.h
/usr/local/include/node/openssl/md2.h
/usr/local/include/node/openssl/md4.h
/usr/local/include/node/openssl/md5.h
/usr/local/include/node/openssl/mdc2.h
/usr/local/include/node/openssl/modes.h
/usr/local/include/node/openssl/obj_mac.h
/usr/local/include/node/openssl/objects.h
/usr/local/include/node/openssl/objectserr.h
/usr/local/include/node/openssl/ocsp.h
/usr/local/include/node/openssl/ocsperr.h
/usr/local/include/node/openssl/opensslconf.h
/usr/local/include/node/openssl/opensslconf_asm.h
/usr/local/include/node/openssl/opensslconf_no-asm.h
/usr/local/include/node/openssl/opensslv.h
/usr/local/include/node/openssl/ossl_typ.h
/usr/local/include/node/openssl/pem.h
/usr/local/include/node/openssl/pem2.h
/usr/local/include/node/openssl/pemerr.h
/usr/local/include/node/openssl/pkcs12.h
/usr/local/include/node/openssl/pkcs12err.h
/usr/local/include/node/openssl/pkcs7.h
/usr/local/include/node/openssl/pkcs7err.h
/usr/local/include/node/openssl/rand.h
/usr/local/include/node/openssl/rand_drbg.h
/usr/local/include/node/openssl/randerr.h
/usr/local/include/node/openssl/rc2.h
/usr/local/include/node/openssl/rc4.h
/usr/local/include/node/openssl/rc5.h
/usr/local/include/node/openssl/ripemd.h
/usr/local/include/node/openssl/rsa.h
/usr/local/include/node/openssl/rsaerr.h
/usr/local/include/node/openssl/safestack.h
/usr/local/include/node/openssl/seed.h
/usr/local/include/node/openssl/sha.h
/usr/local/include/node/openssl/srp.h
/usr/local/include/node/openssl/srtp.h
/usr/local/include/node/openssl/ssl.h
/usr/local/include/node/openssl/ssl2.h
/usr/local/include/node/openssl/ssl3.h
/usr/local/include/node/openssl/sslerr.h
/usr/local/include/node/openssl/stack.h
/usr/local/include/node/openssl/store.h
/usr/local/include/node/openssl/storeerr.h
/usr/local/include/node/openssl/symhacks.h
/usr/local/include/node/openssl/tls1.h
/usr/local/include/node/openssl/ts.h
/usr/local/include/node/openssl/tserr.h
/usr/local/include/node/openssl/txt_db.h
/usr/local/include/node/openssl/ui.h
/usr/local/include/node/openssl/uierr.h
/usr/local/include/node/openssl/whrlpool.h
/usr/local/include/node/openssl/x509.h
/usr/local/include/node/openssl/x509_vfy.h
/usr/local/include/node/openssl/x509err.h
/usr/local/include/node/openssl/x509v3.h
/usr/local/include/node/openssl/x509v3err.h
/usr/local/include/node/uv.h
/usr/local/include/node/uv/aix.h
/usr/local/include/node/uv/android-ifaddrs.h
/usr/local/include/node/uv/bsd.h
/usr/local/include/node/uv/darwin.h
/usr/local/include/node/uv/errno.h
/usr/local/include/node/uv/linux.h
/usr/local/include/node/uv/os390.h
/usr/local/include/node/uv/posix.h
/usr/local/include/node/uv/stdint-msvc2008.h
/usr/local/include/node/uv/sunos.h
/usr/local/include/node/uv/threadpool.h
/usr/local/include/node/uv/tree.h
/usr/local/include/node/uv/unix.h
/usr/local/include/node/uv/version.h
/usr/local/include/node/uv/win.h
/usr/local/include/node/v8-internal.h
/usr/local/include/node/v8-platform.h
/usr/local/include/node/v8-profiler.h
/usr/local/include/node/v8-testing.h
/usr/local/include/node/v8-util.h
/usr/local/include/node/v8-value-serializer-version.h
/usr/local/include/node/v8-version-string.h
/usr/local/include/node/v8-version.h
/usr/local/include/node/v8-wasm-trap-handler-posix.h
/usr/local/include/node/v8-wasm-trap-handler-win.h
/usr/local/include/node/v8.h
/usr/local/include/node/v8config.h
/usr/local/include/node/zconf.h
/usr/local/include/node/zlib.h

Warning: Some taps are not on the default git origin branch and may not receive
updates. If this is a surprise to you, check out the default branch with:
git -C $(brew --repo homebrew/core) checkout

Warning: Broken symlinks were found. Remove them with brew cleanup:
/usr/local/share/man/man3/*
Kates-Other-MBP% brew cleanup
Pruned 1 symbolic links and 3 directories from /usr/local
Kates-Other-MBP% brew update
error: Not a valid ref: refs/remotes/origin/master
fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'

I have tried to install Homebrew on macOS Monterey by following the instructions at https://brew.sh/.

But it resulted in:

error: Not a valid ref: refs/remotes/origin/master
Error: Fetching /opt/homebrew/Library/Taps/homebrew/homebrew-core failed!
fatal: invalid upstream 'origin/master'
Failed during: /opt/homebrew/bin/brew update --force --quiet

1

Gino Mempin's user avatar

Gino Mempin

23.1k27 gold badges91 silver badges120 bronze badges

asked Jun 7, 2022 at 13:55

Merry's user avatar

I encountered this error on my brand new Macbook Pro with the M2 processor. What worked for me was removing the contents of the homebrew directory

rm -rf /opt/homebrew

Then running the uninstall script (its the same as the intall script on the homebrew except change the last part from install to uninstall. Assuming the link has not changed on the homebrew website I ran these two commands and it installed successfully.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

You can run brew -v or brew doctor to check if your install is good.

answered Jul 7, 2022 at 22:55

Ricky's user avatar

RickyRicky

2391 silver badge9 bronze badges

4

My error was after a failed previous install with WSL… so same on windows, only:

cd /home 
sudo rm -rf homebrew/

answered Nov 27, 2022 at 10:35

James Stanbridge's user avatar

This worked on M1.

 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"
git config --global core.compression 0
git config --global http.postBuffer 1048576000
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

answered Jan 19 at 20:35

Sourabh Shekhar's user avatar

This is a list of commonly encountered problems, known issues, and their solutions.

  • Running brew
    • brew complains about absence of “Command Line Tools”
    • Ruby: bad interpreter: /usr/bin/ruby^M: no such file or directory
    • Ruby: bad interpreter: /usr/bin/ruby
    • brew update complains about untracked working tree files
    • launchctl refuses to load launchd plist files
    • brew upgrade errors out
    • Python: easy-install.pth cannot be linked
  • Installation fails with “unknown revision or path not in the working tree”
  • Upgrading macOS
  • Cask — cURL error
    • If the download works
    • If the download does not work
  • Cask — checksum does not match
  • Cask — permission denied
  • Cask — source is not there
  • Cask — wrong number of arguments
  • Other local issues

Running brew

brew complains about absence of “Command Line Tools”

You need to have the Xcode Command Line Utilities installed (and updated): run xcode-select --install in the terminal.

Ruby: bad interpreter: /usr/bin/ruby^M: no such file or directory

You cloned with git, and your Git configuration is set to use Windows line endings. See this page on configuring Git to handle line endings.

Ruby: bad interpreter: /usr/bin/ruby

You don’t have a /usr/bin/ruby or it is not executable. It’s not recommended to let this persist; you’d be surprised how many .apps, tools and scripts expect your macOS-provided files and directories to be unmodified since macOS was installed.

brew update complains about untracked working tree files

After running brew update, you receive a Git error warning about untracked files or local changes that would be overwritten by a checkout or merge, followed by a list of files inside your Homebrew installation.

This is caused by an old bug in in the update code that has long since been fixed. However, the nature of the bug requires that you do the following:

cd "$(brew --repository)"
git reset --hard FETCH_HEAD

If brew doctor still complains about uncommitted modifications, also run this command:

cd "$(brew --repository)/Library"
git clean -fd

launchctl refuses to load launchd plist files

When trying to load a plist file with launchctl, you receive an error that resembles either:

Bug: launchctl.c:2325 (23930):13: (dbfd = open(g_job_overrides_db_path, [...]
launch_msg(): Socket is not connected

or:

Could not open job overrides database at: /private/var/db/launchd.db/com.apple.launchd/overrides.plist: 13: Permission denied
launch_msg(): Socket is not connected

These are likely due to one of four issues:

  1. You are using iTerm. The solution is to use Terminal.app when interacting with launchctl.
  2. You are using a terminal multiplexer such as tmux or screen. You should interact with launchctl from a separate Terminal.app shell.
  3. You are attempting to run launchctl while logged in remotely. You should enable screen sharing on the remote machine and issue the command using Terminal.app running on that machine.
  4. You are su‘ed as a different user.

brew upgrade errors out

When running brew upgrade, you see something like this:

Error: undefined method `include?' for nil:NilClass
Please report this bug:
    https://docs.brew.sh/Troubleshooting
/usr/local/Library/Homebrew/formula.rb:393:in `canonical_name'
/usr/local/Library/Homebrew/formula.rb:425:in `factory'
/usr/local/Library/Contributions/examples/brew-upgrade.rb:7
/usr/local/Library/Contributions/examples/brew-upgrade.rb:7:in `map'
/usr/local/Library/Contributions/examples/brew-upgrade.rb:7
/usr/local/bin/brew:46:in `require'
/usr/local/bin/brew:46:in `require?'
/usr/local/bin/brew:79

This happens because an old version of the upgrade command is hanging around for some reason. The fix:

cd "$(brew --repository)/Library/Contributions/examples"
git clean -n # if this doesn't list anything that you want to keep, then
git clean -f # this will remove untracked files

Python: easy-install.pth cannot be linked

Warning: Could not link <formula>. Unlinking...
Error: The `brew link` step did not complete successfully
The formula built, but is not symlinked into /usr/local
You can try again using `brew link <formula>'

Possible conflicting files are:
/usr/local/lib/python2.7/site-packages/site.py
/usr/local/lib/python2.7/site-packages/easy-install.pth
==> Could not symlink file: /homebrew/Cellar/<formula>/<version>/lib/python2.7/site-packages/site.py
Target /usr/local/lib/python2.7/site-packages/site.py already exists. You may need to delete it.
To force the link and overwrite all other conflicting files, do:
  brew link --overwrite formula_name

To list all files that would be deleted:
  brew link --overwrite --dry-run formula_name

Don’t follow the advice here but fix by using
Language::Python.setup_install_args in the formula as described in
Python for Formula Authors.

Installation fails with “unknown revision or path not in the working tree”

When installing Homebrew, if the initial download fails with something like:

error: Not a valid ref: refs/remotes/origin/master
fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

or:

fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

This is an issue in the connection between your machine and GitHub, rather than a bug in Homebrew itself. See this discussion topic for a number of solutions others have found, such as using a wired connection or a VPN, or disabling network monitoring tools.

Upgrading macOS

Upgrading macOS can cause errors like the following:

  • dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.54.dylib
  • configure: error: Cannot find libz

Following a macOS upgrade it may be necessary to reinstall the Xcode Command Line Tools and then brew upgrade all installed formulae:

xcode-select --install
brew upgrade

Cask — cURL error

First, let’s tackle a common problem: do you have a .curlrc file? Check with ls -A ~ | grep .curlrc (if you get a result, the file exists). Those are a frequent cause of issues of this nature. Before anything else, remove that file and try again. If it now works, do not open an issue. Incompatible .curlrc configurations must be fixed on your side.

If, however, you do not have a .curlrc or removing it did not work, let’s see if the issue is upstream:

  1. Go to the vendor’s website (brew home <cask_name>).
  2. Find the download link for the app and click on it.

If the download works

The cask is outdated. Let’s fix it:

  1. Look around the app’s website and find out what the latest version is. It may be expressed in the URL used to download it.
  2. Take a look at the cask’s version (brew info <cask_name>) and verify it is indeed outdated. If the app’s version is :latest, it means the url itself is outdated. It will need to be changed to the new one.

Help us by submitting a fix. If you get stumped, open an issue explaining your steps so far and where you’re having trouble.

If the download does not work

The issue isn’t in any way related to Homebrew Cask, but with the vendor or your connection.

Start by diagnosing your connection (try to download other casks, or browse around the web). If the problem is with your connection, try a website like Ask Different to ask for advice.

If you’re sure the issue is not with your connection, contact the app’s vendor and let them know their link is down, so they can fix it.

Do not open an issue.

Cask — checksum does not match

First, check if the problem was with your download. Delete the downloaded file (its location will be pointed out in the error message) and try again.

If the problem persists, the cask must be outdated. It’ll likely need a new version, but it’s possible the version has remained the same (this happens occasionally when the vendor updates the app in-place).

  1. Go to the vendor’s website (brew home <cask_name>).
  2. Find out what the latest version is. It may be expressed in the URL used to download it.
  3. Take a look at the cask’s version (brew info <cask_name>) and verify it is indeed outdated. If so, it will need to be updated.

Help us by submitting a fix. If you get stumped, open an issue explaining your steps so far and where you’re having trouble.

Cask — permission denied

In this case, it’s likely your user account has no admin rights and therefore lacks permissions for writing to /Applications, which is the default install location. You can use --appdir to choose where to install your applications.

If --appdir doesn’t fix the issue or you do have write permissions to /Applications, verify you’re the owner of the Caskroom directory by running ls -dl "$(brew --prefix)/Caskroom" and checking the third field. If you are not the owner, fix it with sudo chown -R "$(whoami)" "$(brew --prefix)/Caskroom". If you are, the problem may lie in the app bundle itself.

Some app bundles don’t have certain permissions that are necessary for us to move them to the appropriate location. You may check such permissions with ls -ls '/path/to/application.app'. If you see something like dr-xr-xr-x at the start of the output, that may be the cause. To fix it, we need to change the app bundle’s permission to allow us to move it, and then set it back to what it was (in case the developer set those permissions deliberately). See litecoin.rb for an example of such a cask.

Help us by submitting a fix. If you get stumped, open an issue explaining your steps so far and where you’re having trouble.

Cask — source is not there

First, you need to identify which artifact is not being handled correctly anymore. It’s explicit in the error message: if it says It seems the App source…' then the problem is with the app stanza. This pattern is the same across all artifacts.

Fixing this error is typically easy, and requires only a bit of time on your part. Start by downloading the package for the cask: brew fetch <cask_name>. The last line of output will inform you of the location of the download. Navigate there and manually unpack it. As an example, let’s say the structure inside the archive is as follows:

.
├─ Files/SomeApp.app
├─ Files/script.sh
└─ README.md

Now, if we find this when looking at the cask with brew cat <cask_name>:

(…)
app "SomeApp.app"
(…)

The cask expects SomeApp.app to be in the top directory of the archive (see how it says simply SomeApp.app) but the developer has since moved it to be inside a Files directory. All we have to do is update that line of the cask to follow the new structure: app "Files/SomeApp.app".

Note that occasionally the app’s name changes completely (from SomeApp.app to OtherApp.app, let’s say). In these instances, the filename of the cask itself, as well as its token, must also change. Consult the token reference for complete instructions on the new name.

Help us by submitting a fix. If you get stumped, open an issue explaining your steps so far and where you’re having trouble.

Cask — wrong number of arguments

Make sure the issue really lies with your macOS version. To do so, try to install the software manually. If it is incompatible with your macOS version, it will tell you. In that case, there is nothing we can do to help you install the software, but we can add a depends_on macos: stanza to prevent the cask from being installed on incompatible macOS versions.

Help us by submitting a fix. If you get stumped, open an issue explaining your steps so far and where you’re having trouble.

Other local issues

If your Homebrew installation gets messed up (and fixing the issues found by brew doctor doesn’t solve the problem), reinstalling Homebrew may help to reset to a normal state. To easily reinstall Homebrew, use Homebrew Bundle to automatically restore your installed formulae and casks. To do so, run brew bundle dump, uninstall, reinstall and run brew bundle install.

I need to install brew, as I need pod, to execute «pod install»

However, I am getting stuck for long time, during brew installation.

I have tried

  1. Good Internet connection

  2. Try VPN

  3. Use Google DNS

  4. Restart few times

  5. No anti-virus

But… it still doesn’t work for me :-( I am getting similar error, and I have no more idea how to proceed

I also check the git. Seem legit

yccheok@Yans-MacBook-Pro ~ % git --version 
git version 2.24.3 (Apple Git-128) 

Have setup email for git

yccheok@Yans-MacBook-Pro ~ % git config --global user.email xxx@gmail.com 

Have read

  1. #666

  2. https://stackoverflow.com/questions/39836190/homebrew-install-failed-during-git-fetch-origin-masterrefs-remotes-origin-mas

  3. Homebrew/brew#10878

But still getting the below error no matter how many times I have tried

yccheok@Yans-MacBook-Pro ~ % git config --global user.email xxx@gmail.com
yccheok@Yans-MacBook-Pro ~ % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
==> Checking for `sudo` access (which may request your password).
Password:
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /usr/sbin/chown -R yccheok:admin /usr/local/Homebrew
==> Downloading and installing Homebrew...
remote: Enumerating objects: 19, done.
remote: Counting objects: 100% (19/19), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 28 (delta 12), reused 12 (delta 12), pack-reused 9
Unpacking objects: 100% (28/28), done.
From https://github.com/Homebrew/brew
   1777a03aac..731e25e0cc  master     -> origin/master
HEAD is now at 731e25e0cc Merge pull request #11041 from xxyzz/man
error: Not a valid ref: refs/remotes/origin/master
fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: SHA1 COLLISION FOUND WITH e9405b4a427b316ef3e5f01422bcf58e74982ad0 !
fatal: index-pack failed
Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed!
fatal: invalid upstream 'origin/master'
Failed during: /usr/local/bin/brew update --force --quiet

Any idea what could went wrong? Thanks

Hi,

I have these error while trying to install home-brew and php with the suggestion of Alfred support team.

I had errors when trying to run some workflows and because of this I reached out to Alfred support.

Here are the errors.

Thanks in advance.

home brew;

terminal command I used (from home-brew website): /bin/bash -c «$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)»

 * [new branch]          dependabot/bundler/Library/Homebrew/sorbet-static-and-runtime-0.5.10172 -> origin/dependabot/bundler/Library/Homebrew/sorbet-static-and-runtime-0.5.10172

   5080312bd..985f29f59  master     -> origin/master

Updating files: 100% (3739/3739), done.

HEAD is now at 985f29f59 Merge pull request #13605 from Rylan12/api-merge-variations

error: Not a valid ref: refs/remotes/origin/master

fatal: ambiguous argument ‘refs/remotes/origin/master’: unknown revision or path not in the working tree.

Use ‘—‘ to separate paths from revisions, like this:

‘git <command> [<revision>…] — [<file>…]’

error: RPC failed; curl 56 LibreSSL SSL_read: error:02FFF036:system library:func(4095):Connection reset by peer, errno 54

error: 2132 bytes of body are still expected

fetch-pack: unexpected disconnect while reading sideband packet

fatal: early EOF

fatal: fetch-pack: invalid index-pack output

Error: Fetching /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core failed!

fatal: invalid upstream ‘origin/master’

Failed during: /usr/local/bin/brew update —force —quiet

PHP installation;

I used this command in the terminal: brew install php@7.4

Warning: No available formula with the name «php@7.4».

==> Searching for similarly named formulae…

Error: No similarly named formulae found.

==> Searching for a previously deleted formula (in the last month)…

Error: No previously deleted formula found.

==> Searching taps on GitHub…

Error: No formulae found in taps.

This is where it all started trying to run a workflow called downmedia. I had the same issue on few other workflows as well.

image.png.55dff6706dd8aff69b8728318504ef30.png

Thanks !

rvong

Brew install => error: Not a valid ref: refs/remotes/origin/master

brew config output

brew doctor output

Verification

  • I ran brew update and am still able to reproduce my issue.
  • I have resolved all warnings from brew doctor and that did not fix my problem.

What were you trying to do (and why)?

install brew

@Richards-MacBook-Air ~ % /bin/bash -c «$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)»

What happened (include all command output)?

==> Downloading and installing Homebrew…
HEAD is now at 40e3a47 Merge pull request #13022 from Homebrew/update-man-completions
error: Not a valid ref: refs/remotes/origin/master
fatal: ambiguous argument ‘refs/remotes/origin/master’: unknown revision or path not in the working tree.
Use ‘—‘ to separate paths from revisions, like this:
‘git […] — […]’

What did you expect to happen?

install works

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

@Richards-MacBook-Air ~ % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

MikeMcQuaid

That’s because you didn’t read the issue form which told you to post this elsewhere.

There’s an issue with your internet connection to GitHub. Homebrew cannot do anything about this.

rvong

Where is elsewhere? If it’s a GH issue, then there should be mirrors for the artifacts.

MikeMcQuaid

Where is elsewhere?

The install repository. Don’t create an issue there, though, because it’ll be closed.

If it’s a GH issue, then there should be mirrors for the artifacts.

If you’re willing to work on this: awesome. This isn’t something we have capacity to do.

rvong

This was fixed by runninguninstall, then retrying reinstall.

Something like:
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/uninstall.sh)"

Quick scripts or common troubleshooting should be added to https://docs.brew.sh/ somewhere.
I found the solution in an issue on brew GH issues where someone replied to their own question with this solution.

Понравилась статья? Поделить с друзьями:
  • Error not a statement перевод
  • Error no set method providing array access
  • Error obtaining mac configuration for user astra linux
  • Error not a statement java
  • Error no goals have been specified for this build