【轉】mac終端安裝node時候,顯示“-bash: brew: command not found”,怎么解決?


原文網址:https://segmentfault.com/q/1010000004221389/a-1020000004221408

mac終端安裝node時候,顯示“-bash: brew: command not found”,怎么解決?

查看全部 2 個回答

0

沒安裝 Homebrew

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

 

如果出現如下錯誤:

[homebrew]安裝報錯curl: Failed to connect to raw.githubusercontent.com port:443

eact native搭建環境,安裝homebrew的時候,在終端輸入

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

提示:curl: (7) Failed to connect to raw.githubusercontent.com port 443: Operation

解決方法:

這個是stackoverflow的解決方法,英文的,我翻譯了一下

我的翻譯:

先在瀏覽器輸入這個地址:

https://raw.githubusercontent.com/Homebrew/install/master/install


看是否能打開,不能打開就是你網絡有問題,不要問我哦。

能打開如下:

把這個網頁保存名為brew_install.rb的文件,保存的位置你隨便,只要自己能找到。

則在終端輸入curl

$ curl

curl: try 'curl --help' or 'curl --manual' for more information

這樣就沒錯,要是報錯,那我就不知道了!

然后在終端進入存放這個文件的目錄(這個不用我教吧),然后終端輸入

ruby brew_install.rb

然后等安裝homebrew吧!

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM