冲泡安装冻结
Posted
技术标签:
【中文标题】冲泡安装冻结【英文标题】:brew install Freezing 【发布时间】:2021-10-05 06:16:55 【问题描述】:brew install <PackageName>
遇到问题
我有 macOS BigSur 并且可以轻松使用诸如 brew 之类的命令,但最近降级 (Mojave) 我不能再这样做了
它会冻结大约 60 秒并回复(如果我做对了)无法更新主存储库
代码:
Updating Homebrew...
error: Not a valid ref: refs/remotes/origin/master
fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
fatal: Could not resolve HEAD to a revision
==> Homebrew has enabled anonymous aggregate formula and cask analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics
No analytics have been recorded yet (nor will be during this `brew` run).
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
==> Auto-updated Homebrew!
Updated 1 tap (homebrew/cask).
==> New Casks
8x8-work disk-expert guilded odbc-manager ubports-installer
diagnostics duplicate-file-finder hush pktriot
==> Updated Casks
Updated 352 casks.
==> Deleted Casks
adafruit-arduino beautune caramba-switcher
adobe-lens-profile-creator blue-jeans-browser-plugin
Warning: No available formula or cask with the name "htop".
==> 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.
【问题讨论】:
<PackageName>
是什么?我的意思是你要安装什么软件?
@ArvindKumarAvinash htop
【参考方案1】:
Homebrew 由 git repos 管理。从输出中,homebrew
已分离,homebrew-core
存储库丢失。
让我们尝试以下命令来修复 repos。
# Reset remote repo for Homebrew, the pkg manager itself
git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew.git
# Reset origin for homebrew taps
BREW_TAPS="$(brew tap)"
for tap in core cask,-fonts,-drivers,-versions; do
if echo "$BREW_TAPS" | grep -qE "^homebrew/$tap\$"; then
git -C "$(brew --repo homebrew/$tap)" remote set-url origin https://github.com/Homebrew/homebrew-$tap.git
fi
done
brew update-reset
如果它不起作用,您可能需要重新安装 Homebrew。
【讨论】:
以上是关于冲泡安装冻结的主要内容,如果未能解决你的问题,请参考以下文章