Gui*_*rti 3 macos terminal homebrew pyenv
我最近通过终端安装了Homebrew,但是当我尝试使用它安装其他程序时出现一些错误。
这是我尝试安装pyenv时的示例情况。
brew install pyenv
Run Code Online (Sandbox Code Playgroud)
这是上述命令的输出:
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>
Run Code Online (Sandbox Code Playgroud)
小智 12
我有同样的问题。
解决我在 macOS Monterey 12.1 上的问题的方法是调查问题brew doctor,然后按照建议的输出进行操作。
的输出brew doctor告诉我 homebrew/homebrew-core 尚未被正确利用,并建议使用以下命令:
rm -rf "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core"
brew tap homebrew/core
Run Code Online (Sandbox Code Playgroud)
然后我继续Pyenv 的安装过程,一切正常。