【问题标题】:Ruby Install failed on MacBook Pro M1Ruby 安装在 MacBook Pro M1 上失败
【发布时间】:2022-01-12 23:22:05
【问题描述】:

我试图在 MacBook M1 上安装 Ruby,但每次都失败, 使用的命令:rvm install ruby​​ 2.7.2(没有一个版本有效)

Error running '__rvm_make install',
please read /Users/myName/.rvm/log/1641910054_ruby-2.7.2/install.log

There has been an error while running make install. Halting the installation.

在查看日志后,我发现

*** Following extensions are not compiled:
gdbm:
Could not be configured. It will not be installed.
Check ext/gdbm/mkmf.log for more details.
openssl:
    Could not be configured. It will not be installed.
    Check ext/openssl/mkmf.log for more details.
*** Fix the problems, then remove these directories and try again if you want.

我也尝试过其他版本管理器,例如 asdf,但没有成功。

背景HomeBrew安装成功,路径也设置好了,rvm也安装了。还使用最新版本的 Xcode 13.2.1 和最新的 macOS Monterey 12.1 安装了 Xcode 的命令行工具。

【问题讨论】:

  • 我尝试通过 asdf 安装 Ruby 但没有成功,可能是由于路径冲突。所以我不得不切换回 Big Sur 并且 rvm 工作正常,请查看下面的评论以获得进一步的说明

标签: ruby xcode rvm apple-m1 asdf


【解决方案1】:

我想也许 rvm 在 m1 上不能正常工作?现在尝试使用brew install ruby。它应该工作相同。

【讨论】:

  • 在花了 3.4 天之后,我知道 rvm 在 M1 上工作正常,但 rbenv 不行。所以我尝试使用 rvm 在新机器上安装 Ruby,并将 ruby​​ 特定版本文件夹复制到 rbenv 目录(因为我的项目使用 rbenv 安装 ruby​​)。
  • 我不得不切换回 Big Sur 操作系统从头开始尝试,幸运的是,这次 rvm 运行良好。
猜你喜欢
  • 2021-04-03
  • 2023-02-20
  • 2021-11-21
  • 2022-01-18
  • 2021-10-30
  • 2022-09-29
  • 2021-04-24
  • 2021-12-20
  • 1970-01-01
相关资源
最近更新 更多