我正试图用一行命令在macos m1芯片上安装国产啤酒,但始终会遇到以下错误。有人能帮我解决这个问题吗?谢谢。
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
==> Checking for `sudo` access (which may request your password)...
Password:
==> This script will install:
/opt/homebrew/bin/brew
/opt/homebrew/share/doc/homebrew
/opt/homebrew/share/man/man1/brew.1
/opt/homebrew/share/zsh/site-functions/_brew
/opt/homebrew/etc/bash_completion.d/brew
/opt/homebrew
Press RETURN to continue or any other key to abort:
==> /usr/bin/sudo /usr/sbin/chown -R miththinda:admin /opt/homebrew
==> Downloading and installing Homebrew...
HEAD is now at a0ae4a7a0 Merge pull request #12658 from sjackman/sj/linkage-checker
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>...]'发布于 2022-01-03 05:27:04
删除目录和尝试重新安装对我有效。
sudo rm -rf /opt/homebrew发布于 2022-04-07 12:08:42
请在您的终端中运行以下命令:
rm -fr $(brew --repo homebrew/core) # because you can't `brew untap homebrew/core`
brew tap homebrew/core您可以查看问题这里的详细信息。
发布于 2022-01-17 18:10:43
在Mac上也有类似的问题,我首先通过键入下面的命令卸载它,然后安装了Xcode,它在再次运行install命令后对我起了作用。
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)"https://stackoverflow.com/questions/70561887
复制相似问题