为什么每次输入 git 命令时 zsh 都会杀死我的进程 [英] Why does zsh kills my process every time I enter a git command
问题描述
我正在尝试在我的苹果 M1 macbook air 上设置 git.我尝试运行 git,我发现我需要先更新我的命令行工具,我也是.但是现在,每次我尝试输入 git 命令时,我一次又一次地看到同一行:zsh:杀死了git
.
I'm trying to set up git on my apple M1 macbook air. I tried to run git and I saw that I needed to update my command-line-tools first and so did I. But now, every time I tried to enter a git command, I see the same line again and again: zsh: killed git
.
例如,当我输入 git
时终端告诉我:zsh:killed git
,当我输入 git --version
时终端告诉我告诉我:zsh:杀死 git --version
等等.有人知道问题出在哪里以及如何解决吗?
For example, when I type git
the terminal tells me: zsh: killed git
, when I type git --version
the terminal tells me: zsh: killed git --version
and so on. Does someone knows where the problem comes from and how to solve it?
感谢您阅读并尝试找到答案.
Thanks for reading and trying to find an answer.
推荐答案
这里我放最后的解决方案.我在我的mac M1上尝试了很多方法,最好的方法是重新安装homebrew.
Here I put the final solution. I tried many methods on my mac M1, the best method is re-install homebrew.
第一步:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
步骤 2:安装自制软件
Step2: Install homebrew
cd /opt
mkdir homebrew # if not exist, just create one.
curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew
那么,问题就解决了.
这篇关于为什么每次输入 git 命令时 zsh 都会杀死我的进程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!