Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationEventAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
29
Help us understand the problem. What are the problem?

More than 5 years have passed since last update.

Organization

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

$ 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

と解決

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
29
Help us understand the problem. What are the problem?