其实就是想装个powershell,而后发现须要安装homebrewgit
好吧,安,结果,又发现超时,超时,超时
以后,你懂的,百度,百度,百度……
结果,过期的帖子,过时的方法……
唉,人笨,没办法,最后死活安上了,作个记录,要不过2天又忘了github
嗯,开shell,粘上,回车,等着就行shell
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
没办法,苦等也是超时,本身动手吧ruby
能够看到,命令中是执行了一个 install 的脚本,那么下载下来改改吧bash
#!/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 # **********下面这行,改为科大的源地址 ******************** # BREW_REPO = "https://github.com/Homebrew/brew".freeze BREW_REPO = "https://mirrors.ustc.edu.cn/brew.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" # 下面还有不少,不粘了,看着累
看着还行,好吧,回车,接着安curl
迷糊,怎么又停了,原来还要安装 homebrew-core,结果又去美帝下载了url
好吧,你恨,我改spa
能够看到 clone 的路径code
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
咱们接着用科大的blog
git clone https://mirrors.ustc.edu.cn/homebrew-core.git /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core
美滋滋……
检查一下
brew doctor brew update
终因而安上了
brew cask install powershell
醉了,还要用 homebrew-cask
行吧,要安装的位置知道了,接着抱科大的大腿
git clone https://mirrors.ustc.edu.cn/homebrew-cask.git "$(brew --repo)"/Library/Taps/homebrew/homebrew-cask
这里面的 $(brew --repo)
是 homebrew的安装位置,也就是默认的 /usr/local/Homebrew
飞通常的感受
接着 powershell
HOOOOOOOOO!!!!!!!!!!!!!,终于安上了
Homebrew Core: 核心软件仓库,第一个报错中的homebrew-core
Homebrew Cask: 提供 macOS 应用和大型二进制文件,第二个报错中 homebrew-cask
Homebrew Bottles:预编译二进制软件包,这个咱们没用到,须要的能够看一下科大的说明