最美情侣中文字幕电影,在线麻豆精品传媒,在线网站高清黄,久久黄色视频

歡迎光臨散文網(wǎng) 會(huì)員登陸 & 注冊(cè)

在Linux使用brew(更新版)

2022-01-24 16:34 作者:beyondware  | 我要投稿

安裝前準(zhǔn)備

1. 安裝依賴

- ?Ubuntu ?

sudo apt install build-essential procps curl file git

- ?Fedora ?

sudo dnf groupinstall 'Development Tools'

sudo dnf install curl file git

2. 修改環(huán)境變量

export HOMEBREW_BREW_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git"

export HOMEBREW_CORE_GIT_REMOTE="https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git"

export HOMEBREW_BOTTLE_DOMAIN="https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles"

安裝

1. 安裝 brew

git clone --depth=1 https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/install.git?brew-install

/bin/bash brew-install/install.sh

rm -rf brew-install

2. 添加 PATH 變量

echo 'eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"' >> $HOME/.bash_profile

eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"

3. brew-cask

sudo mkdir -p /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-cask

sudo git clone https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git?/home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-cask

4. 查看源

git -C "$(brew --repo)" remote -v

git -C "$(brew --repo homebrew/core)" remote -v

git -C "$(brew --repo homebrew/cask)" remote -v

5. 官方源

git -C "$(brew --repo)" remote set-url origin https://github.com/Homebrew/brew.git

git -C "$(brew --repo homebrew/core)" remote set-url origin https://github.com/Homebrew/homebrew-core.git

git -C "$(brew --repo homebrew/cask)" remote set-url origin https://github.com/Homebrew/homebrew-cask.git

brew update

6. 替換源

git -C "$(brew --repo)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git

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

git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git

brew update

7. brew-bottles 換源

- bash

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles'?>> ~/.bash_profile

source ~/.bash_profile

- zsh

echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles'?>> ~/.zshrc

source ~/.zshrc

8. 查詢版本

brew -v

brew --version

顯示3個(gè)庫(kù)

> Homebrew 3.3.11

> Homebrew/homebrew-core (git revision 34f9503efb7; last commit 2022-01-24)

> Homebrew/homebrew-cask (git revision b0206bb04c; last commit 2022-01-24)

9. 驗(yàn)證

brew doctor

10. 幫助

brew help

man brew

## 對(duì)應(yīng)庫(kù)

1. brew

> https://github.com/Homebrew/brew

> https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git

對(duì)應(yīng)位置

> /home/linuxbrew/.linuxbrew/Homebrew/bin/brew


2. brew-croe

> https://formulae.brew.sh/formula/

> https://github.com/Homebrew/homebrew-core

> https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git

對(duì)應(yīng)位置

> /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-core


3. brew-cask

> https://formulae.brew.sh/cask/

> https://github.com/Homebrew/homebrew-cask

> https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git

對(duì)應(yīng)位置

> /home/linuxbrew/.linuxbrew/Homebrew/Library/Taps/homebrew/homebrew-cask


4. 主庫(kù)

> https://formulae.brew.sh/

> https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles

brew

1. 安裝

> brew install

2. 移除

> brew uninstall

> brew remove

3. 自動(dòng)移除

> brew autoremove

4. 查找(遠(yuǎn)程存儲(chǔ)庫(kù))

> brew search 軟件名

5. 列出(已安裝)

> brew list

6. 更新

> brew update

> brew upgrade

7. 詳細(xì)信息

> brew info

8. 清理(舊版本)

> brew cleanup

9. 查看緩存路徑

> brew --cache

brew cask

1. 安裝

> brew install --cask

2. 列出(已安裝 cask)

> brew list --casks

3. 搜索

> brew search --cask

參考

1. 官方文檔

> https://docs.brew.sh/Homebrew-on-Linux

2. 清華大學(xué)鏡像源

> https://mirrors.tuna.tsinghua.edu.cn/help/homebrew/

> https://mirrors.tuna.tsinghua.edu.cn/help/homebrew-bottles/

3. 網(wǎng)友博客

> https://www.mintimate.cn/2020/04/05/Homebrew/

PS:macOS與Linux存在一些區(qū)別(特別是cask),安裝路徑也不一樣,不一定適用于Linux。



在Linux使用brew(更新版)的評(píng)論 (共 條)

分享到微博請(qǐng)遵守國(guó)家法律
鄂州市| 额济纳旗| 海南省| 延安市| 乌鲁木齐县| 台南县| 延庆县| 平和县| 仪征市| 开鲁县| 扶沟县| 凤台县| 维西| 安岳县| 山东| 和林格尔县| 内乡县| 汪清县| 新乐市| 通榆县| 余姚市| 渭源县| 秭归县| 搜索| 建平县| 潢川县| 屯门区| 曲阜市| 元朗区| 东兴市| 荥经县| 海兴县| 西贡区| 台东县| 余姚市| 东港市| 琼中| 泌阳县| 桂林市| 库车县| 南通市|