Andreia
Andreia

Reputation: 177

Error running '__rvm_make -j 1'

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/[email protected]/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/[email protected]/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT   -I. -I.ext/include/x86_64-darwin17 -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/[email protected]/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/Xcode.app/Contents/Developer/usr --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/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
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

Upvotes: 15

Views: 26130

Answers (4)

Yurii Uvarov
Yurii Uvarov

Reputation: 49

For M1 processors:

Right click Terminal from the Application/Utilities folder, Get Info, and tick the "Open using Rosetta" box.

Uninstall Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh)"
rm -rf /opt/homebrew/*
sudo rm -rf /opt/homebrew

Reinstall Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Restart terminal

Check Homebrew is working fine: brew doctor

Reinstall openssl: brew install openssl

Install Ruby: rvm install 2.5.0

It is a copy-paste from Github: https://github.com/rvm/rvm/issues/5146#issuecomment-967048308

Upvotes: 4

user1664513
user1664513

Reputation: 1

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

Upvotes: 0

Alex Harvey
Alex Harvey

Reputation: 15472

I 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.

Upvotes: 4

Evan
Evan

Reputation: 941

Try rvm install 2.5.0 --disable-dtrace

the reason is here, https://github.com/rbenv/ruby-build/issues/1061,

possible Ruby build problem

Upvotes: 15

Related Questions