Skip to content

Instantly share code, notes, and snippets.

@kouheiszk
Created September 21, 2014 10:22
Show Gist options
  • Save kouheiszk/00cd202478926ff818e8 to your computer and use it in GitHub Desktop.
Save kouheiszk/00cd202478926ff818e8 to your computer and use it in GitHub Desktop.
Yosemiteに入れたrbenvでrubyインストール中にエラーが出た
$ rbenv install 2.1.3                                                                               [581/1081]
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 20140919-2-g04fe8ab)

Inspect or clean up the working tree at /var/folders/58/4vyw_25n3d32kr7j7dmpzlh00000gn/T/ruby-build.20140921182129.89547
Results logged to /var/folders/58/4vyw_25n3d32kr7j7dmpzlh00000gn/T/ruby-build.20140921182129.89547.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.

CC=/usr/bin/gcc をつけてコマンドを叩くと行けました。

$ CC=/usr/bin/gcc rbenv install 2.1.3
Downloading ruby-2.1.3.tar.gz...
-> http://dqw8nmjcqpjn7.cloudfront.net/0818beb7b10ce9a058cd21d85cfe1dcd233e98b7342d32e9a5d4bebe98347f01
Installing ruby-2.1.3...
Installed ruby-2.1.3 to /Users/kouhei/.anyenv/envs/rbenv/versions/2.1.3
$ rbenv versions
* system (set by /Users/kouhei/.anyenv/envs/rbenv/version)
  2.1.3

やったー。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment