You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Mac M1芯片下无法通过RVM安装任意Ruby版本的解决方法

Mac M1芯片设备上RVM无法安装Ruby版本的解决办法

问题描述

在搭载M1芯片的Mac设备上,无法通过RVM安装任意Ruby版本。

错误示例

TTRAN-YK0WK9W9PM:virtual_terminal tuantran$ rvm install 2.7.6
ruby-2.7.6 - #removing src/ruby-2.7.6..
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/12.3/arm64/ruby-2.7.6.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Certificates bundle '/usr/local/etc/openssl@1.1/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/tuantran/.rvm/rubies/ruby-2.7.6, this may take a while depending on your cpu(s)...
ruby-2.7.6 - #downloading ruby-2.7.6, this may take a while depending on your connection...
ruby-2.7.6 - #extracting ruby-2.7.6 to /Users/tuantran/.rvm/src/ruby-2.7.6.....
ruby-2.7.6 - #configuring.........................................................................
ruby-2.7.6 - #post-configuration.
ruby-2.7.6 - #compiling......................................................
Error running '__rvm_make -j10',
please read /Users/tuantran/.rvm/log/1658248808_ruby-2.7.6/make.log

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

解决步骤

  1. 从「应用程序/实用工具」文件夹中右键点击终端,选择「显示简介」,勾选「使用Rosetta打开」选项。
  2. 卸载Homebrew,执行以下命令:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
    rm -rf /opt/homebrew/*
    sudo rm -rf /opt/homebrew
    
  3. 重新安装Homebrew:
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
    
  4. 重启终端。
  5. 检查Homebrew运行状态:brew doctor
  6. 重新安装openssl:brew install openssl
  7. 安装Ruby版本,例如:rvm install 2.7(或其他任意需要的版本)

内容的提问来源于stack exchange,提问作者Tony Tran

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.25 06:45:42