天天看點

mac上安裝Homebrew及一些報錯的處理使用報錯:報錯:

安裝:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"      

可參考官網:

https://brew.sh/

使用

brew list nginx   # 來顯示路徑
brew info ngnix   # 檢視nginx安裝是安裝檔案
      

報錯:

-bash: brew: command not found      

解決辦法:

終端輸入

sudo vim .bash_profile      

輸入i進入輸入模式, 添加

export PATH="/usr/local/bin:$PATH"      

按esc鍵退出輸入模式, 輸入:wq退出并儲存, 最後輸入使配置生效

source .bash_profile      

brew `require': cannot load such file      

解決辦法

重新安裝Homebrew

報錯

LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54      
# 1、下載下傳install檔案
$ curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install >> brew_install

# 2、修改鏡像位址為 中國科學技術大學鏡像
$ cat brew_install

# BREW_REPO = "https://github.com/Homebrew/brew".freeze 
# CORE_TAP_REPO = "https://github.com/Homebrew/homebrew-core".freeze 

BREW_REPO = "https://mirrors.ustc.edu.cn/brew.git".freeze 
CORE_TAP_REPO = "https://mirrors.ustc.edu.cn/homebrew-core.git".freeze 

# 3、執行安裝腳本
$ /usr/bin/ruby brew_install
      

參考

macOS High Sierra10.13.3安裝homebrew報錯LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54解決方法

繼續閱讀