前言
剛?cè)胧忠慌_(tái)Mac筆記本,沒有啥配置,需要使用腳本安裝一些軟件或者插件需要使用brew,好記性不如爛筆頭,順手記錄下安裝過程
一、brew安裝
1、brew 鏡像安裝腳本
該安裝腳本用了中科大鏡像加速訪問,僅修改倉庫地址部分,不會(huì)產(chǎn)生安全隱患。 關(guān)于中科大所提供的 Homebrew
鏡像服務(wù) https://lug.ustc.edu.cn/wiki/mirrors/help/brew.git
/usr/bin/ruby -e "$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install)"
或者gitee鏡像
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
Warning: 重要信息
如果遇到command not found brew
,請(qǐng)執(zhí)行下面腳本完成安裝或者直接重新打開終端:
eval "$(/opt/homebrew/bin/brew shellenv)"
- 運(yùn)行 brew help 開始體驗(yàn)吧
- 教程文檔:
https://brew.idayer.com
2、官網(wǎng)安裝
進(jìn)入官網(wǎng)找到下圖部分,點(diǎn)擊進(jìn)入查看最新安裝命令
或者直接訪問 https://brew.sh/index_zh-cn
具體執(zhí)行命令如下:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
安裝之后可執(zhí)行 brew --version
查看安裝版本
執(zhí)行 brew doctor
命令以確保一切正確配置:
二、使用步驟
例如使用brew安裝nginx文章來源:http://www.zghlxwxcb.cn/news/detail-631647.html
brew install nginx
如圖顯示即安裝成功文章來源地址http://www.zghlxwxcb.cn/news/detail-631647.html
到了這里,關(guān)于Mac如何安裝brew及使用brew安裝軟件/插件?的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!