Homebrew官網
homebrew,mac軟件包的管理器,國內源安裝
網站服務:Homebrew,ai導航。
The Missing Package Manager for macOS (or Linux).
homebrew官網,mac軟件包的管理器,國內源安裝
什么是homebrew?
簡而言之,就是一個應用市場,就好比 win 上的軟件管家(不是安全管家哈,這個只有安裝、刪除等管理軟件包的功能)官方定義的是:macOS 缺失的軟件包的管理器
homebrew官網: https://brew.sh/
Homebrew國內源
- 清華源
- https://mirrors.tuna.tsinghua.edu.cn/help/homebrew
- 中科大源
- http://mirrors.ustc.edu.cn/help/brew.git.html
Homebrew 是一款及開放源代碼的軟件包管理系統,用以簡化 macOS 和 linux 系統上的軟件安裝過程。它擁有安裝、卸載、更新、查看、搜索等很多實用的功能,通過簡單的一條指令,就可以實現包管理,十分方便快捷。
Homebrew
主要有四個部分組成: brew
、homebrew-core
、homebrew-bottles
、homebrew-cask
。
名稱 | 說明 |
---|---|
brew | Homebrew 源代碼倉庫 |
homebrew-core | Homebrew 核心軟件倉庫 |
homebrew-bottles | Homebrew 預編譯二進制軟件包 |
homebrew-cask | 提供 macOS 應用和大型二進制文件 |
HomeBrew安裝
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
建議使用:中科院
卸載
/bin/zsh?-c?"$(curl?-fsSL?https://gitee.com/cunkai/HomebrewCN/raw/master/HomebrewUninstall.sh)"
HomeBrew換源
中科大(建議使用)
git -C "$(brew --repo)" remote set-url origin https://mirrors.ustc.edu.cn/brew.git
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git
brew update
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles/bottles' >> ~/.bash_profile
source ~/.bash_profile
阿里云
cd "$(brew --repo)"
git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
brew update
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile
清華
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
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/bottles' >> ~/.bash_profile
source ~/.bash_profile
騰訊
git -C "$(brew --repo)" remote set-url origin https://mirrors.cloud.tencent.com/homebrew/brew.git
git -C "$(brew --repo homebrew/core)" remote set-url origin https://mirrors.cloud.tencent.com/homebrew/homebrew-core.git
git -C "$(brew --repo homebrew/cask)" remote set-url origin https://mirrors.cloud.tencent.com/homebrew/homebrew-cask.git
brew update
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.cloud.tencent.com/homebrew-bottles/bottles' >> ~/.bash_profile
source ~/.bash_profile
初始默認鏡像(國外源)
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
HomeBrew常用命令
軟件搜索
brew search TEXT|/REGEX/
查看軟件相關信息(顯示軟件的各種信息(包括版本、源碼地址、依賴等等)
brew info [FORMULA|CASK...]
安裝軟件
brew install FORMULA|CASK...
卸載軟件
brew uninstall FORMULA|CASK...
查看安裝列表
brew list [FORMULA|CASK...]
查看包信息
brew info [FORMULA|CASK...]
查看哪些包可以更新
brew outdated
更新包 Homebrew 會安裝新版本的包,但舊版本依然會保留
brew upgrade [FORMULA|CASK...]
brew 自身更新
brew update
清理舊版本和緩存
brew cleanup # 清理所有包的舊版本
brew cleanup [FORMULA ...] # 清理指定包的舊版本
brew cleanup -n # 查看可清理的舊版本包,不執行實際操作
鎖定不想更新的包
brew pin [FORMULA ...] # 鎖定某個包
brew unpin [FORMULA ...] # 取消鎖定
tips:因為update會一次更新所有的包的,當我們想忽略的時候可以使用這個命令
軟件服務管理
brew services list # 查看使用brew安裝的服務列表
brew services run formula|--all # 啟動服務(僅啟動不注冊)
brew services start formula|--all # 啟動服務,并注冊
brew services stop formula|--all # 停止服務,并取消注冊
brew services restart formula|--all # 重啟服務,并注冊
Homebrew網址入口
OpenI小編發現Homebrew網站非常受用戶歡迎,請訪問Homebrew網址入口試用。
數據評估
關于Homebrew特別聲明
本站OpenI提供的Homebrew都來源于網絡,不保證外部鏈接的準確性和完整性,同時,對于該外部鏈接的指向,不由OpenI實際控制,在2023年 9月 7日 下午3:19收錄時,該網頁上的內容,都屬于合規合法,后期網頁的內容如出現違規,可以直接聯系網站管理員進行刪除,OpenI不承擔任何責任。
相關導航
暫無評論...