gpt4 book ai didi

macos - 尝试安装 pyenv 时出现 Homebrew 错误

转载 作者:行者123 更新时间:2023-12-05 08:29:24 34 4
gpt4 key购买 nike

我最近通过终端安装了 Homebrew,但是当我尝试使用它安装其他程序时出现一些错误。

这是我尝试安装 pyenv 时的示例情况。

brew install pyenv

这是上面命令的输出:

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>

最佳答案

我遇到了完全相同的问题。

解决我在 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

然后我继续Pyenv's installation process一切正常。

关于macos - 尝试安装 pyenv 时出现 Homebrew 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70583637/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com