Guido Diforti
Guido Diforti

Reputation: 41

Homebrew error while trying to install pyenv

I recently installed Homebrew via terminal, but I get some errors when I try to use it to install other programs.

This is an example situation when I try to install pyenv.

brew install pyenv

This is the output of above command:

Running `brew update --preinstall`...
Warning: No available formula with the name "ca-certificates".
==> 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.
Error: 
  homebrew-cask is a shallow clone.
To `brew update`, first run:
  git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow
This command may take a few minutes to run due to the large size of the repository.
This restriction has been made on GitHub's request because updating shallow
clones is an extremely expensive operation due to the tree layout and traffic of
Homebrew/homebrew-core and Homebrew/homebrew-cask. We don't do this for you
automatically to avoid repeatedly performing an expensive unshallow operation in
CI systems (which should instead be fixed to not use shallow clones). Sorry for
the inconvenience!
Error: pyenv: undefined method `cellar' for #<BottleSpecification:0x00007fd7720b4360>

Upvotes: 3

Views: 7336

Answers (1)

user17890629
user17890629

Reputation:

I had the exact same problem.

What solved my issue on macOS Monterey 12.1 was to investigate the problem with brew doctor and then do as the output recommended.

The output of brew doctor informed me that the homebrew/homebrew-core hasn't been tapped properly and recommended the following commands:

rm -rf "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core"
brew tap homebrew/core

Then I just continued with Pyenv's installation process and everything worked.

Upvotes: 12

Related Questions