Installing Ruby 2.3.8 uses incompatible openssl
I've installed OpenSSL through homebrew, and I'm installing ruby 2.3.8 and getting the following error:
$ asdf install ruby 2.3.8
Downloading ruby-build...
Cloning into 'ruby-build-source'...
remote: Enumerating objects: 386, done.
remote: Counting objects: 100% (386/386), done.
remote: Compressing objects: 100% (274/274), done.
remote: Total 10645 (delta 267), reused 150 (delta 94), pack-reused 10259
Receiving objects: 100% (10645/10645), 2.24 MiB | 1.63 MiB/s, done.
Resolving deltas: 100% (6948/6948), done.
Note: checking out 'v20191102'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:
git checkout -b <new-branch-name>
HEAD is now at f6e8dc1 ruby-build 20191102
ruby-build: using openssl from homebrew
Downloading ruby-2.3.8.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.8.tar.bz2
Installing ruby-2.3.8...
ruby-build: using readline from homebrew
BUILD FAILED (OS X 10.14.6 using ruby-build 20191102)
Inspect or clean up the working tree at /var/folders/9b/922bttx934n7l9d0jf66xzn00000gn/T/ruby-build.20200219123505.39425
Results logged to /var/folders/9b/922bttx934n7l9d0jf66xzn00000gn/T/ruby-build.20200219123505.39425.log
Last 10 log lines:
installing capi-docs: /Users/dean/.asdf/installs/ruby/2.3.8/share/doc/ruby
The Ruby openssl extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Configure options used:
--prefix=/Users/dean/.asdf/installs/ruby/2.3.8
--with-openssl-dir=/usr/local/opt/[email protected]
--with-readline-dir=/usr/local/opt/readline
CC=clang
LDFLAGS=-L/Users/dean/.asdf/installs/ruby/2.3.8/lib
CPPFLAGS=-I/Users/dean/.asdf/installs/ruby/2.3.8/include
It's using the new openssl 1.1, which I think it isn't compatible with.
When using ruby-build directly, it downloads and uses openssl 1.0.2b and ruby install works.
Updating to head (asdf update --head) solved the issue. It looks like this version bump solved it.
Hi @deanmarano may I know how do you solve it ? I am trying to install 2.3.3 but I got this error using asdf on M1
> asdf update --head
Update command disabled. Please use the package manager that you used to install asdf to upgrade asdf
> asdf install ruby 2.3.3
BUILD FAILED (macOS 12.0.1 using ruby-build 20211225)
Inspect or clean up the working tree at /var/folders/c5/ph5_2q3n6hl9dg8w6zdpwsh00000gn/T/ruby-build.20211226174643.8550.eC9lM7
Results logged to /var/folders/c5/ph5_2q3n6hl9dg8w6zdpwsh00000gn/T/ruby-build.20211226174643.8550.log
Last 10 log lines:
_dgram_write in libcrypto.a(bss_dgram.o)
_RAND_query_egd_bytes in libcrypto.a(rand_egd.o)
...
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[4]: *** [link_a.darwin] Error 1
make[3]: *** [do_darwin-shared] Error 2
make[2]: *** [libcrypto.1.0.0.dylib] Error 2
make[1]: *** [shared] Error 2
make: *** [build_crypto] Error 1
asdf update --head Update command disabled. Please use the package manager that you used to install asdf to upgrade asdf
It looks like you installed asdf using a package manager. If you uninstall asdf, and then install using the git version here:
http://asdf-vm.com/guide/getting-started.html#_2-download-asdf
git clone https://github.com/asdf-vm/asdf.git ~/.asdf --branch v0.9.0
that might resolve it.