mac装brew
Posted 0916m
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了mac装brew相关的知识,希望对你有一定的参考价值。
Mac下使用国内镜像安装Homebrew
一、根据官网上的方法,在终端输入:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
二、下载修改安装文件
然并卵,在我们大新疆是实现不了的。。。。
找兄弟帮忙,打开该页面
https://raw.githubusercontent.com/Homebrew/install/master/install
然后另存文件传回来,后做如下修改。
安装全文如下:
!/System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin/ruby
This script installs to /usr/local only. To install elsewhere (which is
unsupported) you can untar https://github.com/Homebrew/brew/tarball/master
anywhere you like.
HOMEBREW_PREFIX = "/usr/local".freeze
HOMEBREW_REPOSITORY = "/usr/local/Homebrew".freeze
HOMEBREW_CORE_TAP = "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core".freeze
HOMEBREW_CACHE = "#{ENV["HOME"]}/Library/Caches/Homebrew".freeze
HOMEBREW_OLD_CACHE = "/Library/Caches/Homebrew".freeze
BREW_REPO = "https://github.com/Homebrew/brew".freeze
BREW_REPO_INSECURE = "git://github.com/Homebrew/brew.git".freeze
CORE_TAP_REPO = "https://github.com/Homebrew/homebrew-core".freeze
CORE_TAP_REPO_INSECURE = "git://github.com/Homebrew/homebrew-core.git".freeze
BREW_REPO = "git://mirrors.ustc.edu.cn/brew.git".freeze
BREW_REPO_INSECURE = "git://mirrors.ustc.edu.cn/brew.git".freeze
CORE_TAP_REPO = "git://mirrors.ustc.edu.cn/homebrew-core.git".freeze
CORE_TAP_REPO_INSECURE = "git://mirrors.ustc.edu.cn/homebrew-core.git".freeze
TODO: bump version when new macOS is released
MACOS_LATEST_SUPPORTED = "10.14".freeze
TODO: bump version when new macOS is released
MACOS_OLDEST_SUPPORTED = "10.12".freeze
no analytics during installation
ENV["HOMEBREW_NO_ANALYTICS_THIS_RUN"] = "1"
ENV["HOMEBREW_NO_ANALYTICS_MESSAGE_OUTPUT"] = "1"
get nicer global variables
require "English"
module Tty
module_function
def blue
bold 34
end
def red
bold 31
end
def reset
escape 0
end
def bold(code = 39)
escape "1;#{code}"
end
def underline
escape "4;39"
end
def escape(code)
"