Sunday, May 5, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 4099  / 3 Years ago, wed, september 29, 2021, 11:14:29

I'm trying to change temporarily to a specific Ruby version 2.7.6.


But encountered the following error.


$ rbenv install 2.7.6
Downloading ruby-2.7.6.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.6.tar.bz2
Installing ruby-2.7.6...

BUILD FAILED (Ubuntu 22.04 using ruby-build 20220610)

Inspect or clean up the working tree at /tmp/ruby-build.20220831000029.32729.dL15Mz
Results logged to /tmp/ruby-build.20220831000029.32729.log

Last 10 log lines:
from ./tool/rbinstall.rb:846:in `block (2 levels) in install_default_gem'
from ./tool/rbinstall.rb:279:in `open_for_install'
from ./tool/rbinstall.rb:845:in `block in install_default_gem'
from ./tool/rbinstall.rb:835:in `each'
from ./tool/rbinstall.rb:835:in `install_default_gem'
from ./tool/rbinstall.rb:799:in `block in <main>'
from ./tool/rbinstall.rb:950:in `block in <main>'
from ./tool/rbinstall.rb:947:in `each'
from ./tool/rbinstall.rb:947:in `<main>'
make: *** [uncommon.mk:373: do-install-all] Error 1

More From » ruby

 Answers
7

Ubuntu 22.04 comes with OpenSSL 3.0.2, but Ruby versions older than I think 3.0.4 still need the old OpenSSL 1.1.1x. The build process is looking for the header files of OpenSSL 1.1.1x, doesn't find them and tells you that: cannot load such file -- openssl.


The current version of the rbenv plugin ruby-build should take this situation into account and download the fitting version of OpenSSL, in addition to the Ruby sources:


Downloading openssl-1.1.1q.tar.gz...
-> https://dqw8nmjcqpjn7.cloudfront.net/d7939ce614029cdff0b6c20f0e2e5703158a489a72b2507b8bd51bf8c8fd10ca
Installing openssl-1.1.1q...
patching file test/v3ext.c
Installed openssl-1.1.1q to /home/henning/.rbenv/versions/2.7.6

Downloading ruby-2.7.6.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.6.tar.bz2
Installing ruby-2.7.6...

You probably need to update your installation of ruby-build (and rbenv in general) to the most current version.


[#268] Thursday, September 30, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ngthmated

Total Points: 12
Total Questions: 115
Total Answers: 113

Location: Saint Vincent and the Grenadines
Member since Wed, Apr 21, 2021
3 Years ago
ngthmated questions
;