[RVM][Mac] Error running 'make ', please read ruby-1.9.2-p290/make.log

Tadashi Shigeoka ·  Wed, February 8, 2012

When trying to set up a Ruby environment using RVM on Mac, I encountered an error right away.

■ Error Content

$ rvm install 1.9.2 -C --with-readline-dir=/usr/local
Fetching yaml-0.1.4.tar.gz to /Users/your_username/.rvm/archives
Extracting yaml-0.1.4.tar.gz to /Users/your_username/.rvm/src
Configuring yaml in /Users/your_username/.rvm/src/yaml-0.1.4.
Compiling yaml in /Users/your_username/.rvm/src/yaml-0.1.4.
Installing yaml to /Users/your_username/.rvm/usr
Installing Ruby from source to: /Users/your_username/.rvm/rubies/ruby-1.9.2-p290, this may take a while depending on your cpu(s)...

ruby-1.9.2-p290 - #fetching 
ruby-1.9.2-p290 - #extracted to /Users/your_username/.rvm/src/ruby-1.9.2-p290 (already extracted)
ruby-1.9.2-p290 - #configuring 
ruby-1.9.2-p290 - #compiling 
Error running 'make ', please read /Users/your_username/.rvm/log/ruby-1.9.2-p290/make.log
There has been an error while running make. Halting the installation.

The cause was that gcc changed from Mac OS Lion, and compilation couldn’t complete successfully.

So you can fix this by referencing this article to install apple-gcc42 and temporarily changing the gcc to use with CC=‘gcc-4.2’.

[Mac] Homebrew で apple-gcc42 をインストールする方法 | CodeNote.net

By the way, if you want to build a Ruby development environment on Lion, please refer to this:

Mac OS X Lion に RVM で Ruby の開発環境を構築する手順 | CodeNote.net

That’s all from the Gemba regarding RVM compilation errors.

【References】

Mac OS X LionにRuby 1.8.7、Rails 3.0.10をインストールする - モンテカットの開発日記