mac 安装SVN报错Error: Command failed with exit 128: git
Posted 五月呀
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mac 安装SVN报错Error: Command failed with exit 128: git相关的知识,希望对你有一定的参考价值。
1.mac安装svn
在终端输入下面命令
brew install subversion
结果安装不成功,报错如下:
==> Installing dependencies for subversion: apr, ca-certificates, openssl@1.1, apr-util, gettext, lz4 and utf8proc
==> Installing subversion dependency: apr
fatal: not in a git directory
Error: Command failed with exit 128: git
重新执行命令
unset HOMEBREW_BOTTLE_DOMAIN
再次执行安装命令,还是报同样的错误~~😂
2.解决办法
查看brew版本
brew -v
如下图,根据提示信息,需要设置safe.directory路径
Homebrew 3.6.11-43-g759ab2d
fatal: unsafe repository ('/opt/homebrew/Library/Taps/homebrew/homebrew-core' is owned by someone else)
To add an exception for this directory, call:
git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-core
Homebrew/homebrew-core (no Git repository)
fatal: unsafe repository ('/opt/homebrew/Library/Taps/homebrew/homebrew-cask' is owned by someone else)
To add an exception for this directory, call:
git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-cask
Homebrew/homebrew-cask (no Git repository)
解决办法,执行下面命令
git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-core
git config --global --add safe.directory /opt/homebrew/Library/Taps/homebrew/homebrew-cask
再次执行安装命令,成功安装~
brew install svn//安装svn
svn --version//查看版本
以上是关于mac 安装SVN报错Error: Command failed with exit 128: git的主要内容,如果未能解决你的问题,请参考以下文章
Mac 终端报错 zsh: command not found: brew 解决方案
mac下python3.6安装mysqlclient报错mysql_config: command
python安装模块的时候报错error: command 'gcc' failed with exit status 1
解决mac安装homebrew后报错-bash: brew: command not found
mac brew cask安装软件提示:Error: Unknown command: cask
安装vcredist_x86,报错提示:Command line option syntax error.Type Command /?for Help