Help us understand the problem. What is going on with this article?

Xcode8環境下でrbenvにてrubyのコンパイルに失敗する

More than 3 years have passed since last update.
$ rbenv install 2.3.1

Downloading ruby-2.3.1.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.bz2
Installing ruby-2.3.1...

BUILD FAILED (OS X 10.11.6 using ruby-build 20160602)

Inspect or clean up the working tree at /var/folders/w1/_jhh90bj5lx0xg0hycdqvjs40000gn/T/ruby-build.20160918151039.20332
Results logged to /var/folders/w1/_jhh90bj5lx0xg0hycdqvjs40000gn/T/ruby-build.20160918151039.20332.log

Last 10 log lines:
  Referenced from: /private/var/folders/w1/_jhh90bj5lx0xg0hycdqvjs40000gn/T/ruby-build.20160918151039.20332/ruby-2.3.1/./miniruby (which was built for Mac OS X 10.12)
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: _clock_gettime
  Referenced from: /private/var/folders/w1/_jhh90bj5lx0xg0hycdqvjs40000gn/T/ruby-build.20160918151039.20332/ruby-2.3.1/./miniruby (which was built for Mac OS X 10.12)
  Expected in: /usr/lib/libSystem.B.dylib

make: *** [encdb.h] Trace/BPT trap: 5
make: *** Waiting for unfinished jobs....
make: *** [.rbconfig.time] Trace/BPT trap: 5

Mac OS X 10.12 用のが入っているのが原因なようなので、必要なツールをインストールする

$ xcode-select --install

xcode-select: note: install requested for command line developer tools

そうすると

$ rbenv install 2.3.1                                                                      
Downloading ruby-2.3.1.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.1.tar.bz2
Installing ruby-2.3.1...
Installed ruby-2.3.1 to /Users/xxxx/.rbenv/versions/2.3.1

と解決

m3dev
インターネット、最新IT技術を活用し日本・世界の医療を改善することを目指します
https://m3.recruitment.jp/engineer/
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
Comments
No comments
Sign up for free and join this conversation.
If you already have a Qiita account
Why do not you register as a user and use Qiita more conveniently?
You need to log in to use this function. Qiita can be used more conveniently after logging in.
You seem to be reading articles frequently this month. Qiita can be used more conveniently after logging in.
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away
ユーザーは見つかりませんでした