当前位置:   article > 正文

Mac m1/m2 芯片安装brew和svn保姆级教程_mac m1 svn

mac m1 svn

svn

1、安装brew

终端输入:

  1. /bin/zsh -c "$(curl -fsSL https://gitee.com/huwei1024/HomebrewCN/raw/master/Homebrew.sh)" #下载
  2. /bin/zsh -c "$(curl -fsSL https://gitee.com/huwei1024/HomebrewCN/raw/master/HomebrewUninstall.sh)" #卸载

问题:

Command not find: brew 错误

一般是环境变量没有配置好

重启终端输入:

open -e .zshrc

看到 

  1. # HomeBrew
  2. export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles
  3. export PATH="/usr/local/bin:$PATH"
  4. export PATH="/usr/local/sbin:$PATH"
  5. # HomeBrew END

很明显路径不对,我们的路径在/opt/homebrew/下 

修改为:

  1. # HomeBrew
  2. export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles
  3. export PATH="/opt/homebrew/bin:$PATH"
  4. export PATH="/opt/homebrew/sbin:$PATH"
  5. # HomeBrew END

重启终端

 输入brew --version
看到如下内容说明brew 还没有成功

  1. Homebrew >=2.5.0 (shallow or no git repository)
  2. fatal: detected dubious ownership in repository at '/opt/homebrew/Homebrew/Library/Taps/homebrew/homebrew-core'
  3. To add an exception for this directory, call:
  4. git config --global --add safe.directory /opt/homebrew/Homebrew/Library/Taps/homebrew/homebrew-core
  5. Homebrew/homebrew-core (no Git repository)
  6. fatal: detected dubious ownership in repository at '/opt/homebrew/Homebrew/Library/Taps/homebrew/homebrew-cask'
  7. To add an exception for this directory, call:
  8. git config --global --add safe.directory /opt/homebrew/Homebrew/Library/Taps/homebrew/homebrew-cask
  9. Homebrew/homebrew-cask (no Git repository)

执行

  1. git config --global --add safe.directory /opt/homebrew/Homebrew/Library/
  2. git config --global --add safe.directory /opt/homebrew/Homebrew/Library/

重启终端输入 brew -v 出现如下说明安装成功 

  1. Homebrew >=2.5.0 (shallow or no git repository)
  2. Homebrew/homebrew-core (git revision 50128022fcf; last commit 2023-02-15)
  3. Homebrew/homebrew-cask (git revision ac91c18bac; last commit 2023-02-15)

2、安装SVN

打开终端输入:

brew install svn

等待片刻 出现以下内容说明SVN被安装

  1. svntools have been installed to:
  2. /opt/homebrew/opt/subversion/libexec
  3. The perl bindings are located in various subdirectories of:
  4. /opt/homebrew/opt/subversion/lib/perl5
  5. ==> Summary
  6. 声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/小蓝xlanll/article/detail/545343
    推荐阅读
    相关标签