繁体   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