【问题标题】:ruby-1.9.2 won't install - could not find compiler and 'make' tool [closed]ruby-1.9.2 无法安装 - 找不到编译器和“make”工具 [关闭]
【发布时间】:2025-12-06 00:25:02
【问题描述】:

每次我运行rvm install ruby-1.9.2-p320 时都会收到以下消息。

Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.8/x86_64/ruby-1.9.2-p320.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Can not find compiler and 'make' tool - make sure Xcode and/or Command Line Tools are installed.
Requirements installation failed with status: 11.

我刚开始尝试学习编程,我知道我需要能够安装和运行除默认 1.8.something 之外的不同版本的 ruby​​。我几乎不知道我在做什么,所以请愚蠢地回答任何问题。提前致谢。

【问题讨论】:

  • 这一行说明了一切:找不到编译器和“make”工具 - 请确保已安装 Xcode 和/或命令行工具。
  • 建议(例如,这里:*.com/questions/4360110/…)安装 Xcode。

标签: ruby macos rvm


【解决方案1】:

rvm 正在寻找 gcc 编译器无法找到它的错误非常明显。 解决此问题的两种方法: 1) 安装特定于您的 osx 表单的 gcc 编译器 https://github.com/kennethreitz/osx-gcc-installer

2)

  1. 安装 Xcode

  2. 由于最新版本的 xcode 不再附带命令行工具,请安装命令行工具

Xcode 4.4 and later install Command Line Tools

https://developer.apple.com/library/ios/documentation/DeveloperTools/Conceptual/WhatsNewXcode/Articles/xcode_4_3.html

【讨论】: