Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error running '__rvm_make install'

Tags:

macos

ruby

rvm

I'm new to programming trying to add Ruby 2.2 using RVM and receiving the below error. I've run rvm get stable and tried reinstalling, but getting the same error.

$ rvm reinstall ruby-2.2.0
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.10/x86_64/ruby-2.2.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system.....
Installing required packages: autoconf, automake, libtool, pkg-config, libyaml, readline, libksba, openssl........
Certificates in '/usr/local/etc/openssl/cert.pem' are already up to date.
Requirements installation successful.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-2.2.0, this may take a while depending on your cpu(s)...
ruby-2.2.0 - #downloading ruby-2.2.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 12.6M  100 12.6M    0     0   892k      0  0:00:14  0:00:14 --:--:-- 1518k
ruby-2.2.0 - #extracting ruby-2.2.0 to /usr/local/rvm/src/ruby-2.2.0....
ruby-2.2.0 - #applying patch /usr/local/rvm/patches/ruby/2.2.0/fix_installing_bundled_gems.patch.
ruby-2.2.0 - #configuring..........................................................
ruby-2.2.0 - #post-configuration.
ruby-2.2.0 - #compiling.............................................................
ruby-2.2.0 - #installing..........
Error running '__rvm_make install',
showing last 15 lines of /usr/local/rvm/log/1420687911_ruby-2.2.0/install.log
                              psych 2.0.8
                              rake 10.4.2
                              rdoc 4.2.0
installing bundle gems:       /usr/local/rvm/rubies/ruby-2.2.0/lib/ruby/gems/2.2.0 (build_info, cache, doc, extensions, gems, specifications)
                              minitest-5.4.3.gem
                              power_assert-0.2.2.gem
                              test-unit-3.0.8.gem
./tool/rbinstall.rb:723:in `chmod': Operation not permitted @ chmod_internal - /usr/local/rvm/gems/ruby-1.9.3-p392/ (Errno::EPERM)
    from ./tool/rbinstall.rb:723:in `block in <main>'
    from ./tool/rbinstall.rb:749:in `call'
    from ./tool/rbinstall.rb:749:in `block in <main>'
    from ./tool/rbinstall.rb:746:in `each'
    from ./tool/rbinstall.rb:746:in `<main>'
make: *** [do-install-nodoc] Error 1
++ return 2
There has been an error while running make install. Halting the installation.
like image 406
Dale Brown Avatar asked Jan 08 '15 04:01

Dale Brown


People also ask

What is latest version of Ruby?

What is the latest Ruby version? Ruby 3.1. 0 is the Ruby latest version (3.1. 0 was released Dec 25, 2021).


2 Answers

Try to update your rvm using command

rvm get head

Then try again. Hopefully it should work.

like image 135
Neeraj Kumar Avatar answered Oct 14 '22 07:10

Neeraj Kumar


This error got me scratching my head when installing ruby through RVM on an M1 Macbook:

Error running '__rvm_make -j10',
please read /Users/copmputer/.rvm/log/1640263012_ruby-2.4.0/make.log

There has been an error while running make. Halting the installation.

First you need to inspect the file make.log and see what the underlying error is. In my case it was:

error: implicit declaration of function 'ffi_prep_closure' is invalid in C99 [-Werror,-Wimplicit-function-declaration]

I found the complete solution to my problem on this GitHub page. Here it is:

Step 1 Run in terminal: brew info libffi which will output the following:

For compilers to find libffi you may need to set:
export LDFLAGS="-L/opt/homebrew/opt/libffi/lib"
export CPPFLAGS="-I/opt/homebrew/opt/libffi/include"

For pkg-config to find libffi you may need to set:
export PKG_CONFIG_PATH="/opt/homebrew/opt/libffi/lib/pkgconfig"

Step 2 Run all 3 export commands in terminal to set the env variables.

Step 3 Finally, run the ruby installation command. In my case, it was:

rvm install ruby-2.4.0

That's it.

In case you're using rbenv there's another working solution in that GH thread.

like image 1
The Whiz of Oz Avatar answered Oct 14 '22 06:10

The Whiz of Oz