29
26

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

rbenv使ってYosemiteさんにRuby入れようとしたらBUILD FAILED (OS X 10.10 using ruby-build 20140926-6-gc2b2e15)とか言われた

Last updated at Posted at 2014-10-23

Yosemiteにupdateしてから、rbenvを使ってRuby2.1.3を入れようとしたら以下のエラーになりました。

▶ rbenv install 2.1.3
Downloading ruby-2.1.3.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/0818beb7b10ce9a058cd21d85cfe1dcd233e98b7342d32e9a5d4bebe98347f01
Installing ruby-2.1.3...

BUILD FAILED (OS X 10.10 using ruby-build 20140926-6-gc2b2e15)

Inspect or clean up the working tree at /var/folders/cl/cv8n7__12n15v_c8d1tp58vw0000gn/T/ruby-build.20141024011806.89352
Results logged to /var/folders/cl/cv8n7__12n15v_c8d1tp58vw0000gn/T/ruby-build.20141024011806.89352.log

Last 10 log lines:
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for cd using physical directory... cd -P
checking whether CFLAGS is valid... no
configure: error: something wrong with CFLAGS=" -O3 -Wno-error=shorten-64-to-32  "
make: *** No targets specified and no makefile found.  Stop.

以下のコマンドでインストールできました。

RUBY_CONFIGURE_OPTS="--without-gcc --disable-install-rdoc" rbenv install 2.1.3

以下記事ではYosemiteのgccがぶっ壊れてるとか言っていますが詳細はわかってないです。

20141106 追記
apple-gcc42が入っているとこのエラーになるそうです。
apple-gcc42はYosemiteに対応してないのですが、パスで先に見つかると使われてしまうそうです。
apple-gcc42が入ってるかの確認はbrew listコマンドでできます。
入っている場合はbrew uninstall apple-gcc42でuninstallできます。
その後はrbenv install 2.1.3でinstallできるようになります。

参考
http://igarashikuniaki.net/diary/20141028.html (追記)
RE-INSTALLING RUBY AFTER UPGRADING TO OS X YOSEMITE
[Unable to build Ruby 2.1.3 on OSX 10.10 GM 3.0 with rbenv]
(http://stackoverflow.com/questions/26309860/unable-to-build-ruby-2-1-3-on-osx-10-10-gm-3-0-with-rbenv)
[Cannot install Ruby 2.1.2 on Yosemite Beta]
(https://github.com/sstephenson/rbenv/issues/610)

29
26
2

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
29
26

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?