簡體   English   中英

在 Mac OS High Sierra 上安裝 Ruby 錯誤

[英]Installing Ruby on Mac OS High Sierra error

我一直在嘗試使用 Jekyll static 網站生成器創建 static 網站,但要使用它,我必須使用我的終端安裝 ruby。 但是當我運行brew install ruby時,我收到此消息錯誤,我還找不到解決方案。

Warning: You are using macOS 10.13.
We (and Apple) do not provide support for this old version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Twitter or any other official channels. You are responsible for resolving
any issues you experience while you are running this
old version.

Error: ruby: no bottle available!
You can try to install from source with:
 brew install --build-from-source ruby
Please note building from source is unsupported. You will encounter build
failures with some formulae. If you experience any issues please create pull
requests instead of asking for help on Homebrew's GitHub, Twitter or any other
official channels.

我應該按照錯誤消息的說明從源代碼安裝它嗎?

您可以嘗試使用 Homebrew 安裝 Ruby 管理器。 我更喜歡使用 rbenv。 還有其他選項,尤其是 rvm。 選擇一個並堅持下去。

如果你選擇使用 rbenv

brew install ruby-build rbenv

按照終端中的 brew 警告添加任何需要的環境變量。

列出可用版本

rbenv install --list

安裝你喜歡的

rbenv install <version number>

如評論中所述,您可能會遇到更多問題,因此請盡可能升級 macOS 版本。

暫無
暫無

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

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