rvm / rvm

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

RVM - Error running '__rvm_make -j8' while running rvm install on Debian 12 #5426

Open aarcos opened 10 months ago

aarcos commented 10 months ago

Description

First sorry by my english

When try run "rvm install ruby" my system debian 12 with xfce show this error:

~$ rvm install ruby ruby-3.0.0 - #removing src/ruby-3.0.0.. Checking requirements for debian. Requirements installation successful. Installing Ruby from source to: /home/arcosaf/.rvm/rubies/ruby-3.0.0, this may take a while depending on your cpu(s)... ruby-3.0.0 - #downloading ruby-3.0.0, this may take a while depending on your connection... ruby-3.0.0 - #extracting ruby-3.0.0 to /home/arcosaf/.rvm/src/ruby-3.0.0..... ruby-3.0.0 - #configuring......................................................................... ruby-3.0.0 - #post-configuration.. ruby-3.0.0 - #compiling......................................................................................................................................................................- Error running '__rvm_make -j8', please read /home/"user"/.rvm/log/1703800072_ruby-3.0.0/make.log

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

Steps to reproduce

I use this page for installation ruby with rvm on debian

https://linux.how2shout.com/how-to-install-ruby-version-manager-rvm-on-debian-11-bullseye/

Below here paste portion make.log:

compiling openssl_missing.c compiling ossl.c compiling objspace.c In file included from ossl.h:156, from ossl.c:10: openssl_missing.h:239: warning: "TS_VERIFY_CTS_set_certs" redefined 239 # define TS_VERIFY_CTS_set_certs(ctx, crts) ((ctx)->certs=(crts))
In file included from ossl.h:31: /usr/include/openssl/ts.h:424: note: this is the location of the previous definition 424 # define TS_VERIFY_CTS_set_certs(ctx, cert) TS_VERIFY_CTX_set_certs(ctx,cert)

ossl.c: In function ‘ossl_clear_error’: ossl.c:311:9: warning: ‘ERR_get_error_line_data’ is deprecated: Since OpenSSL 3.0 [-Wdeprecated-declarations] 311 | while ((e = ERR_get_error_line_data(&file, &line, &data, &flags))) { | ^~~~~

But after an analysis:

~$ rvm install ruby --with-openssl-dir=/usr/bin/openssl ruby-3.0.0 - #removing src/ruby-3.0.0.. Checking requirements for debian. Requirements installation successful. Installing Ruby from source to: /home/"user"/.rvm/rubies/ruby-3.0.0, this may take a while depending on your cpu(s)... ruby-3.0.0 - #downloading ruby-3.0.0, this may take a while depending on your connection... ruby-3.0.0 - #extracting ruby-3.0.0 to /home/"user"/.rvm/src/ruby-3.0.0..... ruby-3.0.0 - #configuring......................................................................... ruby-3.0.0 - #post-configuration.. ruby-3.0.0 - #compiling......................................................................................................................................................................| ruby-3.0.0 - #installing..................... ruby-3.0.0 - #making binaries executable... Installed rubygems 3.2.3 is newer than 3.0.9 provided with installed ruby, skipping installation, use --force to force installation. ruby-3.0.0 - #gemset created /home/"user"/.rvm/gems/ruby-3.0.0@global ruby-3.0.0 - #importing gemset /home/"user"/.rvm/gemsets/global.gems..............................there was an error installing gem rubygems-bundler ............................. ruby-3.0.0 - #generating global wrappers........ ruby-3.0.0 - #gemset created /home/"user"/.rvm/gems/ruby-3.0.0 ruby-3.0.0 - #importing gemsetfile /home/"user"/.rvm/gemsets/default.gems evaluated to empty gem list ruby-3.0.0 - #generating default wrappers........ ruby-3.0.0 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake). Install of ruby-3.0.0 - #complete Ruby was built without documentation, to build it run: rvm docs generate-ri

I hope it helps you to correct the problem I'm sorry if this is not the right place to put this note, in my favor it is the only site that has a solution for macOS

Best

arthurduarte1 commented 10 months ago

Same here for ruby 2.7.0 on Mac OS X.

This code below saved my day:

brew install openssl@1.1
brew uninstall --ignore-dependencies openssl@3
rvm install 2.7.0
brew install --ignore-dependencies openssl@3

The "problem" was about openssl. Maybe you can look for something similar on linux.

aarcos commented 10 months ago

Hi Arthur

Yess the problem is in rvm program.

When run rvm install Ruby does not find openssl directory installation, this generate the error.

When add to command

rvm install ruby --openssl-dir=

The problem was solved.

Thanks Arthur Best new year

Alejandro

El jue, 28 de dic. de 2023 21:46, Arthur Duarte @.***> escribió:

Same here for ruby 2.7.0 on Mac OS X.

This code below saved my day:

brew install @. brew uninstall --ignore-dependencies @. rvm install 2.7.0 brew install --ignore-dependencies @.***

The "problem" was about openssl. Maybe you can look for something similar on linux.

— Reply to this email directly, view it on GitHub https://github.com/rvm/rvm/issues/5426#issuecomment-1871648792, or unsubscribe https://github.com/notifications/unsubscribe-auth/AATWIA33H6E7GTYZNOQ4G6LYLYHEPAVCNFSM6AAAAABBGAKQZOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZRGY2DQNZZGI . You are receiving this because you authored the thread.Message ID: @.***>

arthurduarte1 commented 10 months ago

Good to know. Take care, best for you too. :)

brodjustice commented 9 months ago

Trying to get any version below ruby 3 to work with rvm on Debian12 / Ubuntu 22 proved very painful for me. The only method that worked for was to install openssl 1.1.1 alongside openssl 3. For the record this is what I did:

wget https://www.openssl.org/source/old/1.1.1/openssl-1.1.1v.tar.gz
tar xf openssl-1.1.1v.tar.gz
cd openssl-1.1.1v
./config --prefix=/usr/local/openssl1.1.1v --openssldir=/usr/local/openssl1.1.1v/etc
make
sudo make install

Now rebuild the rvm ruby, eg:

rvm reinstall 2.7.8 --with-openssl-dir=/usr/local/openssl1.1.1v

monfresh commented 9 months ago

@brodjustice Ruby versions older than 3.1 do not work with OpenSSL 3. They require OpenSSL 1.1 or lower. This is a common point of confusion, so I wrote this blog post with a handy compatibility chart: https://www.rubyonmac.dev/openssl-versions-supported-by-ruby

brodjustice commented 9 months ago

@monfresh I think the point is that Linux users were have been used to installing RVM on top of their fresh Linux installation and within minutes are good to go for any Ruby between 1.9 and 3.x. This is no longer the case, RVM is effectively broken. There are many issues that seem to have the missing openssl version as the core problem https://github.com/rvm/rvm/issues/5434, https://github.com/rvm/rvm/issues/5361#issuecomment-1612087695, https://github.com/rvm/rvm/issues/5074, etc.

monfresh commented 9 months ago

Ah, yes. I agree. The good news is that there are alternatives available, such as asdf, rbenv, and chruby/ruby-install. Based on my experience on macOS, they are more reliable than rvm.

ahummel25 commented 3 months ago

@monfresh I think the point is that Linux users were have been used to installing RVM on top of their fresh Linux installation and within minutes are good to go for any Ruby between 1.9 and 3.x. This is no longer the case, RVM is effectively broken. There are many issues that seem to have the missing openssl version as the core problem #5434, #5361 (comment), #5074, etc.

This is what I'm still experiencing on mac. Does this effectively mean there isn't a workaround? I can no longer get any 3.x version to install even when providing the --with-openssl-dir flag.

I've tried numerous install commands including the below (with all sorts of flags provided, but just listing these two for brevity's sake):

rvm install 3.3.2 --with-openssl-dir=$(brew --prefix openssl@3)
rvm install 3.3.2 --with-openssl-dir=$(brew --prefix openssl@3.3)

The logs seem to confirm that it's picking up on openssl 3.x but it always fails with something like error running '__rvm_make -j16'.

Is RVM essentially broken until further notice?

brodjustice commented 3 months ago

I'm not familiar with Mac set-up for RVM. But I can say that my work around here still works on Linux.

I'm not sure I'd say that "RVM essentially broken", on Linux it depends on the Ruby and OS/SSL combination you want use as @monfresh indicates here