首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装pyenv时自制错误

安装pyenv时自制错误
EN

Stack Overflow用户
提问于 2022-01-04 18:44:03
回答 1查看 3.7K关注 0票数 2

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

当我尝试安装pyenv时,这是一个示例情况。

代码语言:javascript
复制
brew install pyenv

这是上面命令的输出:

代码语言:javascript
复制
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>
EN

回答 1

Stack Overflow用户

发布于 2022-01-10 09:46:56

我也有同样的问题。

解决了我在macOS蒙特利12.1上的问题的是调查brew doctor的问题,然后按照建议的输出来做。

brew doctor的输出告诉我,没有正确地使用homebrew/homebrew core,并推荐了以下命令:

代码语言:javascript
复制
rm -rf "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core"
brew tap homebrew/core

然后我继续使用Pyenv安装过程,一切都成功了。

票数 10
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/70583637

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档