Skip to content

Instantly share code, notes, and snippets.

@MuhammetDilmac
Created April 28, 2022 14:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MuhammetDilmac/1caa87bd9f631c6d5fbe065ac7cb87e3 to your computer and use it in GitHub Desktop.
Save MuhammetDilmac/1caa87bd9f631c6d5fbe065ac7cb87e3 to your computer and use it in GitHub Desktop.
Ruby 2.7.x installation openssl error solution
/tmp/ruby-build.20220428153926.58149.kvjym0/ruby-2.7.5/lib/rubygems/core_ext/kernel_require.rb:83:in `require': cannot load such file -- openssl (LoadError)
from /tmp/ruby-build.20220428153926.58149.kvjym0/ruby-2.7.5/lib/rubygems/core_ext/kernel_require.rb:83:in `require'
from /tmp/ruby-build.20220428153926.58149.kvjym0/ruby-2.7.5/lib/rubygems/specification.rb:2430:in `to_ruby'
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
curl https://www.openssl.org/source/openssl-1.1.1n.tar.gz | tar xz && cd openssl-1.1.1n
./config --prefix=/old-openssl-version-1.1.1n --openssldir=/old-openssl-version-1.1.1n
RUBY_CONFIGURE_OPTS="--with-openssl-dir=/old-openssl-version-1.1.1n" rbenv install 2.7.5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment