欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Mac M1安裝Homebrew的方法步驟

 更新時間:2021年03月25日 10:51:30   作者:老掌  
這篇文章主要介紹了Mac M1安裝Homebrew的方法步驟,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧

最常用命令

搜索軟件: brew search 軟件包名稱

安裝軟件: brew install 軟件包名稱

卸載軟件: brew uninstall 軟件包名稱

錯誤解決

問題1 : curl: (7) Failed to connect to http://raw.githubusercontent.com port 443: Connection refused” 錯誤

解決方法:

打開 www.ipaddress.com 網(wǎng)站查詢 raw.githubusercontent.com 主機(jī)的真實(shí)IP

打開 /etc/hosts 文件,增加一條記錄

185.199.108.133  raw.githubusercontent.com 

問題2 :如果 brew install 出以下錯誤, 則安裝時使用 arch -arm64 brew install 軟件包名 進(jìn)行安裝

創(chuàng)建安裝目錄

Homebrew 安裝腳本會將程序默認(rèn)裝至 /usr/local/Homebrew ,這是 Intel 芯片架構(gòu)上的安裝路徑,M1芯片上則需要安裝到 /opt/Homebrew/ 下。

sudo mkdir -p /opt/homebrew
sudo chown -R $(whoami) /opt/homebrew

下載 homebrew 包并解壓至 /opt/homebrew 目錄

curl -L https://github.com/Homebrew/brew/tarball/master | tar xz --strip 1 -C homebrew

如果下載慢,可以直接通過 https://github.com/Homebrew/brew/tarball/master 本地下載,copy 到 /opt 目錄下再將壓縮包解壓到 /opt/homebrew 目錄

cp /opt
tar xz 壓縮包名 --strip 1 -C homebrew

將路徑增加到PATH環(huán)境變量中

vim ~/.bash_profile
#在 .bash_profile 中新增
export PATH=$PATH:/opt/homebrew/bin;
#保存退出
#刷新生效
source ~/.bash_profile

修改源

cd "$(brew --repo)"
git clone https://mirrors.ustc.edu.cn/brew.git
 
 
cd "$(brew --repo)/Library/Taps/homebrew"
 
git clone https://mirrors.ustc.edu.cn/homebrew-core.git
 
git clone https://mirrors.ustc.edu.cn/homebrew-cask.git
 
brew update #更新

其它鏡像地址:

HomeBrew 官方鏡像:
brew: https://github.com/Homebrew/brew
core: https://github.com/Homebrew/homebrew-core
cask: https://github.com/Homebrew/homebrew-cask

清華大學(xué)鏡像:
brew: https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git
core: https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git
cask: https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git

中科大鏡像:
brew: https://mirrors.ustc.edu.cn/brew.git
core: https://mirrors.ustc.edu.cn/homebrew-core.git
cask: https://mirrors.ustc.edu.cn/homebrew-cask.git

終于可以進(jìn)行下載軟件了

brew install -s 軟件包名

到此這篇關(guān)于Mac M1安裝Homebrew的方法步驟的文章就介紹到這了,更多相關(guān)M1安裝Homebrew內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關(guān)文章希望大家以后多多支持腳本之家!

相關(guān)文章

最新評論