gpt4 book ai didi

macos - 在 Mac m2 Monterey 上安装 home-brew 时出现问题

转载 作者:行者123 更新时间:2023-12-05 08:03:06 28 4
gpt4 key购买 nike

今天我准备 Homebrew 啤酒。但是当我尝试在我的 MacBook m2 Monterey 上安装时出现问题。

这是我的问题?

fuadazharibrahim@fuads-MacBook-Pro ~ % brew list zsh:找不到命令:brewfuadazharibrahim@fuads-MacBook-Pro ~ %/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh )"==> 正在检查 sudo 访问权限(可能需要您的密码)...密码:

==> 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/ENTER to continue or any other key to abort:
==> /usr/bin/sudo /usr/sbin/chown -R fuadazharibrahim:admin /opt/homebrew
==> Downloading and installing Homebrew...
/bin/bash: line 234: /usr/local/bin/git: Bad CPU type in executable
Failed during: git init -q

我的问题是如何解决我的问题?

最佳答案

您获得的错误意味着您的 git 可执行文件存在问题。你应该:

  • 检查您的设备上是否(正确)安装了 git。这可以通过在您的终端上运行 which git 来完成。
  • 如果未安装 git(或者它的路径不正确),您需要通过以下链接手动安装/重新安装 git:https://git-scm.com/downloads .然后它将引导您到此站点下载安装程序:https://sourceforge.net/projects/git-osx-installer/ .
  • 运行安装程序,它应该正确下载和安装 git。

然后您可以继续安装 Homebrew 软件。希望这有帮助:)

关于macos - 在 Mac m2 Monterey 上安装 home-brew 时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/74686453/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com