本文介绍了尝试通过Homebrew安装Hugo-“无法将HEAD解析为修订版"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用Hugo在新站点上进行刺探,并且在安装过程中被卡住了.我已经安装了Homebrew,并且在运行该版本时,得到以下信息:
I'm trying to take a stab at a new site using Hugo, and I am stuck during installation. I've installed Homebrew and when running the version, I get the following:
~ % brew --version
Homebrew 2.7.2
Homebrew/homebrew-core (no git repository)
Homebrew/homebrew-cask (git revision b96680c; last commit 2021-01-07)
当我运行 brew时,请安装hugo
我得到以下信息:
~ % brew install hugo
fatal: Could not resolve HEAD to a revision
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available formula or cask with the name "hugo".
==> 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.
我做错了什么?这是第一次在家酿制啤酒.
What am I doing wrong? This is the first time working in home-brew.
运行 brew install --verbose Hugo
时,出现以下警告:
when running brew install --verbose Hugo
, I get the following warnings:
% brew install --verbose hugo
fatal: Could not resolve HEAD to a revision
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
Error: No available formula or cask with the name "hugo".
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
/usr/bin/curl --disable --globoff --show-error --user-agent Homebrew/2.7.2\ \(Macintosh\;\ Intel\ Mac\ OS\ X\ 11.1\)\ curl/7.64.1 --header Accept-Language:\ en --retry 3 --location https://api.github.com/search/code\?q=user\%3AHomebrew\+path\%3AFormula\+path\%3ACasks\+path\%3A.\+filename\%3Ahugo\+extension\%3Arb\&per_page=100 --header Accept:\ application/vnd.github.v3\+json --write-out '
'\%\{http_code\} --header Accept:\ application/vnd.github.antiope-preview\+json --header Authorization:\ token\ ****** --dump-header /private/tmp/github_api_headers20210106-8376-1r02uaz
推荐答案
使用
git -C $(brew --repository homebrew/core) checkout master
或
git -C $(brew --repository homebrew/core) reset --hard HEAD.
这篇关于尝试通过Homebrew安装Hugo-“无法将HEAD解析为修订版"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!