美文网首页
Mac开发配置

Mac开发配置

作者: alex_zn | 来源:发表于2018-07-19 14:36 被阅读0次

    清华开源软件镜像站点

    Homebrew 镜像使用帮助

    cd "$(brew --repo)"
    git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
    
    cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
    git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
    
    brew update
    

    使用homebrew-science或者homebrew-python

    git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-science.git
    
    cd "$(brew --repo)/Library/Taps/homebrew/homebrew-python"
    git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-python.git
    
    brew update
    

    对于旧版的 CocoaPods 可以使用如下方法使用 tuna 的镜像:

    $ pod repo remove master
    $ pod repo add master https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git
    $ pod repo update
    
    

    新版的 CocoaPods 不允许用pod repo add直接添加master库了,但是依然可以:

    $ cd ~/.cocoapods/repos 
    $ pod repo remove master
    $ git clone https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git master
    最后进入自己的工程,在自己工程的podFile第一行加上:
    
    source 'https://mirrors.tuna.tsinghua.edu.cn/git/CocoaPods/Specs.git'
    

    相关文章

      网友评论

          本文标题:Mac开发配置

          本文链接:https://www.haomeiwen.com/subject/mortmftx.html