From 1405c9ea896db9cb0c272a1bdd2c63dd4c0ea8c5 Mon Sep 17 00:00:00 2001 From: Wang Cong Date: Wed, 4 Mar 2020 14:58:14 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=AE=89=E8=A3=85=20homebrew=20=E6=97=B6?= =?UTF-8?q?=E4=BD=BF=E7=94=A8=20tuna=20=E9=95=9C=E5=83=8F=20(Linuxbrew=20?= =?UTF-8?q?=E5=8F=AF=E7=94=A8=20sudo)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- _posts/help/1970-01-01-homebrew.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/_posts/help/1970-01-01-homebrew.md b/_posts/help/1970-01-01-homebrew.md index 85723f2..ae60045 100644 --- a/_posts/help/1970-01-01-homebrew.md +++ b/_posts/help/1970-01-01-homebrew.md @@ -47,3 +47,20 @@ git -C "$(brew --repo homebrew/core)" remote set-url origin https://github.com/H # 更换后测试工作是否正常 brew update ``` + +### 安装 homebrew 时使用 tuna 镜像 (Linuxbrew 可用 `sudo`) + +``` +0. 安装 git +1. 下载 https://raw.githubusercontent.com/Linuxbrew/install/master/install-ruby +2. 将其中 https://homebrew.bintray.com/bottles-portable-ruby/ 换为 https://mirrors.cloud.tencent.com/homebrew-bottles/bottles-portable-ruby/ +3. 运行 ./install-ruby 安装 portable ruby +4. export PATH=/home/linuxbrew/.linuxbrew/Homebrew/Library/Homebrew/vendor/portable-ruby/current/bin:$PATH # ==> Add Ruby to your PATH +5. 下载 https://raw.githubusercontent.com/Linuxbrew/install/master/install +6. 将其中 https://github.com/Homebrew/brew 换为 https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git +7. 运行 ./install 安装 brew +8. 执行到 “==> Tapping homebrew/core” 时 Ctrl-C +9. export PATH=/home/linuxbrew/.linuxbrew/Homebrew/bin:$PATH # 将 brew 添加到 PATH +10. git clone https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/linuxbrew-core.git "$(brew --repo homebrew/core)" +11. 再次运行 ./install 即可到达安装成功结果 +``` From 1146b521421241be370b3d9b8b67fa7bed537769 Mon Sep 17 00:00:00 2001 From: Wang Cong Date: Wed, 4 Mar 2020 16:30:33 +0800 Subject: [PATCH 2/2] linuxbrew --- _posts/help/1970-01-01-homebrew.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/help/1970-01-01-homebrew.md b/_posts/help/1970-01-01-homebrew.md index ae60045..f7fa89e 100644 --- a/_posts/help/1970-01-01-homebrew.md +++ b/_posts/help/1970-01-01-homebrew.md @@ -48,7 +48,7 @@ git -C "$(brew --repo homebrew/core)" remote set-url origin https://github.com/H brew update ``` -### 安装 homebrew 时使用 tuna 镜像 (Linuxbrew 可用 `sudo`) +### 安装 linuxbrew 时使用 tuna 镜像 (可用 `sudo`) ``` 0. 安装 git