rvm / rvm

Ruby enVironment Manager (RVM)
https://rvm.io
Other
5.1k stars 1.03k forks source link

Error running '__rvm_make -j8', #5202

Closed 295060456 closed 3 months ago

295060456 commented 2 years ago

My system is MacOS Monterey

image

when I run : \curl -sSL https://get.rvm.io | bash -s stable --ruby

generated an err. follows

image
cymok commented 2 years ago

i got the same error when i run rvm install 2.6 on termux

Error running '__rvm_make -j1',

and cat make.log

1 error generated.
make[2]: *** [Makefile:313: ossl.o] Error 1
make[2]: Leaving directory '/data/data/com.termux/files/home/.rvm/src/ruby-2.6.10/ext/openssl'
make[1]: *** [exts.mk:243: ext/openssl/all] Error 2
make[1]: Leaving directory '/data/data/com.termux/files/home/.rvm/src/ruby-2.6.10'
make: *** [uncommon.mk:286: build-ext] Error 2
++ return 2
marekpetak commented 2 years ago

Same here. Using WSL on Windows 10. jruby installed & works fine, trying to install ruby-2.7.5 I get this error.

rvm install "ruby-2.7.5"
ruby-2.7.5 - #removing src/ruby-2.7.5..
Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/22.04/x86_64/ruby-2.7.5.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for ubuntu.
Requirements installation successful.
Installing Ruby from source to: /home/me/.rvm/rubies/ruby-2.7.5, this may take a while depending on your cpu(s)...
ruby-2.7.5 - #downloading ruby-2.7.5, this may take a while depending on your connection...
ruby-2.7.5 - #extracting ruby-2.7.5 to /home/me/.rvm/src/ruby-2.7.5.....
ruby-2.7.5 - #configuring..........................................................................
ruby-2.7.5 - #post-configuration..
ruby-2.7.5 - #compiling.................
Error running '__rvm_make -j8',
please read /home/me/.rvm/log/1650989833_ruby-2.7.5/make.log

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

rvm version 1.29.12

I have tried https://github.com/rvm/rvm/issues/5039#issuecomment-774577714 , but it made not diff

make.log

rakshasaini commented 2 years ago

I am also facing the same issue in Ubuntu 22.04 LTS

This may be help for you to install rvm. After install ubuntu 22.04 Open your terminal ctrl + alt + T. Run following commands one by one.

update first

$ sudo apt update

then upgrade it

$ sudo apt upgrade

check bash version

$ bash --version

check curl version.

$ curl --version

If curl not install or update. Install it By:-

$ \curl -sSL https://get.rvm.io | bash $ \curl -sSL https://get.rvm.io | bash -s stable --ruby=jruby --gems=rails,puma

In case of further problems with validation please refer to https://rvm.io/rvm/security

Enter below the commands or as suggest in your error files.

$ command curl -sSL https://rvm.io/mpapis.asc | gpg2 --import - $ command curl -sSL https://rvm.io/pkuczynski.asc | gpg2 --import -

Now run following one by one.

$ sudo apt-get install software-properties-common $ sudo apt-add-repository -y ppa:rael-gc/rvm $ sudo apt-get update $ sudo apt-get install rvm

fcarrega commented 2 years ago

Ubuntu 22.04 comes with OpenSSL 3 by default, instead of 1.1.1 in the previous LTS release (20.04).

As Ruby is not yet compatible with OpenSSL 3, the Ruby compilation crashes as this dependency is not resolved.

I managed to bypass this by installing the rvm openssl package manually (rvm pkg install openssl) before installing Ruby with RVM, however you then have two distinct versions of openssl installed on your environment.

When I tried to bundle install my application gems, I then got SSL certificates errors and then rolled back to Ubuntu 20.04.

marekpetak commented 2 years ago

I have tried different openssl via rvm pkg install, but this made no difference at all.

fcarrega commented 2 years ago

I have tried different openssl via rvm pkg install, but this made no difference at all.

Did you pass the OpenSSL path when installing Ruby ? Something like that : rvm install ruby-2.7.6 --with-openssl-dir=$HOME/.rvm/usr ?

marekpetak commented 2 years ago

I have tried different openssl via rvm pkg install, but this made no difference at all.

Did you pass the OpenSSL path when installing Ruby ? Something like that : rvm install ruby-2.7.6 --with-openssl-dir=$HOME/.rvm/usr ?

Yes. But still same problem. I have moved back to 20.04 for now

taimourxkcd commented 1 year ago

why is this issue still open. should have been resolved. every time i want to setup a project i get this error. where are all the developers and maintainers. why is there so much delay. should be closed with a right solution. there is no motivation in ruby community.

monfresh commented 1 year ago

@taimourxkcd I understand your frustration. The problem is that this is not necessarily a bug with rvm. There are many factors that can cause Ruby installation to fail on a Mac, such as:

Also, open source maintainers don't owe anything to anyone. They're not getting paid. If there's a bug with rvm, people are free and encouraged to submit pull requests.

If you don't know how to fix this, here's what I would recommend:

If you're on a Mac, and you don't feel like spending time doing all of that, and you want to use a maintained product that is updated regularly, you can buy my Ruby on Mac product that is guaranteed to fix your Ruby installation issues in 15 minutes or less.

You can also try my free step-by-step guide for installing Ruby on a Mac with ruby-install

danfodorean commented 8 months ago

Make sure you have openssl@1.1 installed and then run: CFLAGS=-DUSE_FFI_CLOSURE_ALLOC rvm install ruby-3.0.0 --with-openssl-dir=$(brew --prefix openssl@1.1)

Apparently openssl3 deprecated some stuff that rvm is using.

monfresh commented 8 months ago

I do not recommend using CFLAGS=-DUSE_FFI_CLOSURE_ALLOC. That is an unnecessary hack. If you have a proper Ruby development setup, you should never need that flag, at least on a Mac. In my 13 years of working with Ruby, I have never had to set that flag.

Also, it's highly recommended to use the latest patch version (the 3rd digit) for any given Ruby version. So, instead of installing Ruby 3.0.0, you should use 3.0.6. This is a common point of confusion and is an important concept to understand. I wrote a detailed post about it: https://www.rubyonmac.dev/how-to-upgrade-the-ruby-version-in-your-project

Finally, the reason why Ruby 3.0 requires OpenSSL 1.1 is because OpenSSL 3 only works with Ruby versions 3.1 and higher. It has nothing to do with OpenSSL deprecating stuff that RVM is using.