为什么每次输入git命令时zsh都会杀死我的进程 [英] Why does zsh kills my process every time I enter a git command

查看:342
本文介绍了为什么每次输入git命令时zsh都会杀死我的进程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在苹果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:kill 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步:安装自制软件

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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆