簡體   English   中英

在 Mac 上安裝 Homebrew 時出現錯誤

[英]I got error when install Homebrew on Mac

我根據網站上的說明運行了以下命令。 但是我得到了這個錯誤。

網址: https://brew.sh/

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
curl: (1) Protocol https not supported or disabled in libcurl
-bash: $: command not found

我調查了在 curl 上啟用 SSL,但我無法在我的環境中找到解決方案。 於是我用瀏覽器訪問https://raw.githubusercontent.com/Homebrew/install/master/install下載到本地運行。 但是我得到了這個錯誤。

$ /usr/bin/ruby -e "$(/Users/tadashingo/Documents/install)"
-bash: /Users/tadashingo/Documents/install: Permission denied

我嘗試了此解決方法,但仍然出現錯誤。 警告:PATH 中的不安全世界可寫目錄 /usr/local/bin,模式 040777

你能指導我在我的環境中安裝 Homebrew 嗎?

解決。

我將名稱從“ install”更改為“ install.rb2”,轉到目錄並運行它。

$ /usr/bin/ruby install.rb

有關不安全目錄/usr/local/bin的警告可以通過運行來解決

sudo chown o-w /usr/local/bin

您收到有關權限被拒絕運行install的錯誤,因為您以錯誤的方式調用它。

運行為:

$ ruby /Users/tadashingo/Documents/install

它會工作。

在最近的拉取請求之后,這是 HomeBrew 的新安裝命令。

/bin/bash -c "$(curl -fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM