我跑brew update
和brew upgrade rbenv ruby-build
。仅供参考:我昨天将 xcode 更新到 8.1 版。
我检查了可用版本,rbenv install -l
.
然后我尝试通过安装ruby2.2.5 rbenv install 2.2.5
,然后我得到以下错误。
我试过 2.3.1 但我得到了同样的错误。我该如何解决这个问题?
Downloading ruby-2.2.5.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.2/ruby-2.2.5.tar.bz2
Installing ruby-2.2.5...
BUILD FAILED (OS X 10.11.6 using ruby-build 20160602)
Inspect or clean up the working tree at /var/folders/2p/49l6q0gs6qzgtxbg4h1st_5h0000gq/T/ruby-build.20161106122840.51330
Results logged to /var/folders/2p/49l6q0gs6qzgtxbg4h1st_5h0000gq/T/ruby-build.20161106122840.51330.log
Last 10 log lines:
Referenced from: /private/var/folders/2p/49l6q0gs6qzgtxbg4h1st_5h0000gq/T/ruby-build.20161106122840.51330/ruby-2.2.5/./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/2p/49l6q0gs6qzgtxbg4h1st_5h0000gq/T/ruby-build.20161106122840.51330/ruby-2.2.5/./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