29
6

More than 5 years have passed since last update.

アンチウイルスソフトの影響で ruby のインストールに失敗した

Posted at
  • macOS 10.12.6
  • rbenv v1.1.0

という環境で ruby 2.5.0 をインストールしようとしたら次のエラーが起こった:

$ rbenv install 2.5.0
ruby-build: use openssl from homebrew
Downloading ruby-2.5.0.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.5/ruby-2.5.0.tar.bz2
Installing ruby-2.5.0...
ruby-build: use readline from homebrew

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

Inspect or clean up the working tree at /var/folders/vt/h5389jvd5gn_1wcjk_jr5h080000gn/T/ruby-build.20180525230737.6484
Results logged to /var/folders/vt/h5389jvd5gn_1wcjk_jr5h080000gn/T/ruby-build.20180525230737.6484.log

Last 10 log lines:
translating probes probes.d
compiling bignum.c
compiling class.c
compiling compar.c
error: error reading '/dev/fd/9'
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....

すかさず error reading '/dev/fd/9' あたりでググると Avira antivirus を無効にするとインストールできるとの噂が...

Error while installing ruby 2.1.1 and newer versions (error reading '/dev/fd/9') · Issue #1074 · rbenv/rbenv · GitHub

ちょうど Avira を使っていたのでメニューの「リアルタイム保護を無効にする」から無効にして、再度インストールを試したところインストールできた :tada:
(このあと再度保護を有効にすることをお忘れなく)

29
6
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
29
6