Mac 安装 Glew 与 GLFW

其实很简单就2 句

brew install glew
brew install glfw3

But , The problem is brew, 阿西吧, brew 要更新,终端一直 超时 time out

brew update -verbose
Error:
  homebrew-core is a shallow clone.
  homebrew-cask is a shallow clone.
To `brew update`, first run:
  git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core fetch --unshallow
  git -C /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask fetch --unshallow

更改了 更新的相关镜像就可以了

  • 步骤1.替换Homebrew源.

    $ cd "$(brew --repo)"
    $ git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
    
    
    • "$(brew --repo)"是用来自动指向Homebrew的目录的.
  • 步骤2.替换homebrew-core源.

    $ cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
    $ git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
    
    
  • 步骤3.替换homebrew-cask源.

    $ cd "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask
    $ git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
    
    
  • 参考链接 link.

Done.

你可能感兴趣的:(Mac 安装 Glew 与 GLFW)