H

Homebrew 安装软件加速

Yuming 配置 2021-10-23
  1. 安装代理软件 https://github.com/yichengchen/clashX
  2. 两种方法

    • 方法一(好处:可控,需要进行brew更新才使用;坏处:较为繁琐)

      .bashrc.zshrc设置

      # ALIAS
      alias proxy="export https_proxy=http://127.0.0.1:7890 http_proxy=http://127.0.0.1:7890 all_proxy=socks5://127.0.0.1:7890; echo 'Proxy on'"
      alias unproxy="unset https_proxy http_proxy all_proxy; echo 'Proxy off'"

      生效source .zshrc

      每次iTerm2设置登录执行proxy或手动执行proxy

    • 方法二(好处:便捷;坏处:可能影响其他命令)

      .bashrc.zshrc设置

      # Proxy
      export https_proxy=http://127.0.0.1:7890
      export http_proxy=http://127.0.0.1:7890
      export all_proxy=socks5://127.0.0.1:7890

      生效source .zshrc

  3. 执行命令

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  4. 按照指令安装
  5. 执行命令查看是否正常

    brew -v
    
    # output:
    # Homebrew 3.2.17-133-g890190c
    # Homebrew/homebrew-core (git revision 5d84b1431d6; last commit 2021-10-23)
    # Homebrew/homebrew-cask (git revision 65500e81bf; last commit 2021-10-23)
PREV
Homebrew 常用命令
NEXT
Golang 通过通道控制携程数量

评论(0)

发布评论