簡體   English   中英

嘗試安裝 pyenv 時出現 Homebrew 錯誤

[英]Homebrew error while trying to install pyenv

我最近通過終端安裝了Homebrew ,但是當我嘗試使用它來安裝其他程序時出現了一些錯誤。

這是我嘗試安裝pyenv時的示例情況。

brew install pyenv

這是上述命令的 output:

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調查問題,然后按照 output 的建議進行操作。

brew doctor的 output 告訴我 homebrew/homebrew-core 沒有被正確挖掘並推薦以下命令:

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

然后我繼續Pyenv 的安裝過程,一切正常。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM