16
14

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.

macOS High Sierraでrbenv installに失敗する

Last updated at Posted at 2018-02-24

問題

標題の通り。
install出来ない。。

最初のエラー

Last 10 log lines:
checking host system type... x86_64-apple-darwin16.7.0
checking target system type... x86_64-apple-darwin16.7.0
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... configure: error: in `/var/folders/9s/64j0hkxj5m97r6b6bqf7kx0m0000gn/T/ruby-build.20180225005030.86114/ruby-2.5.0':
configure: error: cannot run C compiled programs.

対応

xcodeを更新
command line tool のアップデート

次のエラー

BUILD FAILED (OS X 10.12.6 using ruby-build 20171226)

Inspect or clean up the working tree at /var/folders/9s/64j0hkxj5m97r6b6bqf7kx0m0000gn/T/ruby-build.20180225012153.25770
Results logged to /var/folders/9s/64j0hkxj5m97r6b6bqf7kx0m0000gn/T/ruby-build.20180225012153.25770.log

Last 10 log lines:
Target: x86_64-apple-darwin16.7.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
compiling miniinit.c
error: error reading '/dev/fd/8'
1 error generated.
clang: error: unable to remove file: Operation not permitted
dtrace: failed to compile script probes.d: Preprocessor failed to process input program
make: *** [probes.h] Error 1
make: *** Waiting for unfinished jobs....

やったこと

sudo chmod -s /usr/sbin/dtrace
https://github.com/rbenv/ruby-build/issues/1061

それでもダメだったので、、
RUBY_CONFIGURE_OPTS="--disable-dtrace" rbenv install 2.5.0

16
14
1

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
16
14

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?