简体   繁体   English

尝试在Mac OS上运行git uninstall.sh时出现问题

[英]Issues while trying to run git uninstall.sh on Mac OS

I wanted to try to update Git on my Mac OS to the latest version and it says to run the provided uninstall.sh first. 我想尝试将Mac OS上的Git更新到最新版本,并说要先运行提供的uninstall.sh I must confess that I ran the pkg before reading the "Read me". 我必须承认,在阅读“读我”之前,我已经运行了pkg。 Not sure if that screwed it all up ... 不知道这是否搞砸了...

Now I am not big with the terminal and found the following command to run a shell script: 现在我对终端并不了解,发现以下命令可以运行shell脚本:

$ sh uninstall

but that resulted in: 但这导致:

/usr/sbin/uninstall: /usr/sbin/uninstall: cannot execute binary file

where I got stuck now. 我现在被困在那里。

Any idea what I have to do to resolve this error? 知道我该怎么做才能解决此错误吗?

You should run the uninstall.sh packaged with your previous distribution of Git, as explained in " Install and Update to latest version Git on Mac OSX 10.10 Yosemite ": 您应该运行以前版本的Git附带的uninstall.sh ,如“ 在Mac OSX 10.10 Yosemite上安装并更新到最新版本的Git ”中所述:

Upgrading Git from a previous version to the latest 2.0.1 将Git从以前的版本升级到最新的2.0.1

If you have previously installed Git you can upgrade to the latest version by uninstalling the previous install using the uninstall.sh file with the installation. 如果您先前已经安装了Git,则可以通过在安装时使用uninstall.sh文件来卸载先前的安装,从而升级到最新版本。

Go through the same process of downloading and mounting and the .dmg – then launch the Terminal. 完成下载,挂载和.dmg的相同过程,然后启动终端。

http://coolestguidesontheplanet.com/wp-content/uploads/2013/12/upgrading-git-osx.png

uninstall and uninstall.sh are two different things. 卸载和uninstall.sh是两件事。 The former is a binary that comes with the os, the latter is a shell script that comes with the package. 前者是os随附的二进制文件,后者是软件包随附的shell脚本。

Try: sh uninstall.sh instead 尝试:用sh uninstall.sh代替

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM