Today I was trying to install ruby 2.5.0, but I am getting this error every time.
console output with the error I got
rvm install ruby-2.5.0 Searching for binary rubies, this might take some time. No binary rubies available for: osx/10.13/x86_64/ruby-2.5.0. Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies. Checking requirements for osx. Certificates bundle '/usr/local/etc/openssl@1.1/cert.pem' is already up to date. Requirements installation successful. Installing Ruby from source to: /Users/andreiaalmeida/.rvm/rubies/ruby-2.5.0, this may take a while depending on your cpu(s)... ruby-2.5.0 - #downloading ruby-2.5.0, this may take a while depending on your connection... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 13.3M 100 13.3M 0 0 429k 0 0:00:31 0:00:31 --:--:-- 490k No checksum for downloaded archive, recording checksum in user configuration. ruby-2.5.0 - #extracting ruby-2.5.0 to /Users/andreiaalmeida/.rvm/src/ruby-2.5.0.... ruby-2.5.0 - #configuring......................................................| ruby-2.5.0 - #post-configuration. ruby-2.5.0 - #compiling... Error running '__rvm_make -j 1', please read /Users/andreiaalmeida/.rvm/log/1519558776_ruby-2.5.0/make.log There has been an error while running make. Halting the installation. My make.log file
[2018-02-25 11:40:33] __rvm_make __rvm_make () { \make "$@" || return $? } current path: /Users/andreiaalmeida/.rvm/src/ruby-2.5.0 PATH=/usr/local/opt/coreutils/bin:/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/Users/andreiaalmeida/.bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/opt/X11/bin:/Users/andreiaalmeida/.rvm/bin command(3): __rvm_make -j 1 ++ make -j 1 CC = gcc LD = ld LDSHARED = gcc -dynamiclib CFLAGS = -O3 -ggdb3 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wno-tautological-compare -Wno-parentheses-equality -Wno-constant-logical-operand -Wno-self-assign -Wunused-variable -Wimplicit-int -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -Wdivision-by-zero -Wdeprecated-declarations -Wextra-tokens -fno-common -pipe XCFLAGS = -D_FORTIFY_SOURCE=2 -fstack-protector -fno-strict-overflow -fvisibility=hidden -DRUBY_EXPORT CPPFLAGS = -I/usr/local/opt/libyaml/include -I/usr/local/opt/readline/include -I/usr/local/opt/libksba/include -I/usr/local/opt/openssl@1.1/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I. - -I./include -I. -I./enc/unicode/10.0.0 DLDFLAGS = -Wl,-undefined,dynamic_lookup -Wl,-multiply_defined,suppress -L/usr/local/opt/libyaml/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/openssl@1.1/lib -install_name /Users/andreiaalmeida/.rvm/rubies/ruby-2.5.0/lib/libruby.2.5.dylib -compatibility_version 2.5 -current_version 2.5.0 -fstack-protector -framework Foundation -fstack-protector -framework Foundation SOLIBS = -lpthread -lgmp -ldl -lobjc LANG = LC_ALL = LC_CTYPE = UTF-8 Configured with: --prefix=/Applications/ --with-gxx-include-dir=/usr/include/c++/4.2.1 Apple LLVM version 9.0.0 (clang-900.0.39.2) Target: x86_64-apple-darwin17.4.0 Thread model: posix InstalledDir: /Applications/ compiling ./main.c compiling dmydln.c compiling miniinit.c compiling dmyext.c compiling miniprelude.c translating probes probes.d error: error reading '/dev/fd/4' 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 ++ return 2 I tried to completely uninstall rvm (rvm implode) and reinstall it but I wasn't successful.
System
- Mac OS X – High Sierra (10.13.3)
- rvm 1.29.3 (latest)
- Homebrew 1.5.4
3 Answers
Try rvm install 2.5.0 --disable-dtrace
possible Ruby build problem
2I faced the same issue as the original poster.
Compilation would halt at
ruby-2.2.6 - #compiling... Error running '__rvm_make -j 1', please read /Users/alexharvey/.rvm/log/1525652818_ruby-2.2.6/make.log There has been an error while running make. Halting the installation. Inspection of the make.log revealed:
translating probes probes.d error: error reading '/dev/fd/4' 1 error generated. clang: error: unable to remove file: Operation not permitted I finally found this reference to Avira Anti-virus in this link.
I went to Avira Anti-virus and selected "disable real time protection" and tried again. That fixed it.
ruby-2.4.6 - #compiling - please wait Error running '__rvm_make -j4', please read /Users/mgq/.rvm/log/1557891511_ruby-2.4.6/make.log
There has been an error while running make. Halting the installation.
It seems that Avira antivirus is running. It has been reported to cause failures on ruby compilation. Disable it for the time of the installation and try again.
make.log
- __rvm_make:0> make -j4
- '****************'
- error: error reading '/dev/fd/7'
- 1 error generated.
- clang: error: unable to remove file: Operation not permitted