Dear all,

I hope all is well with you. I managed to resolve the issue by calling rbenv 
with the following Ruby configuration options:

RUBY_CONFIGURE_OPTS="--with-openssl-dir=/opt/local/libexec/openssl3 
--with-libyaml-dir=/opt/local" rbenv install 3.4.1

This way it worked. Additionally I had to install ‘libffi’ and ‘libzip’ from 
MacPorts. This was suggested by other posts I found online. Thank you and have 
a wonderful afternoon ahead!

—
Best wishes,
Maxim

Maxim Abalenkov \\ [email protected]
+44 7 486 486 505 \\ www.maxim.abalenkov.uk

> On 7 Feb 2025, at 12:04, Maxim Abalenkov <[email protected]> wrote:
> 
> Dear all,
> 
> How are you? I hope all is well with you. I need help please. I’m struggling 
> to install Ruby 3.4.1 on my MacBook Air (Mid 2011) running BigSur 11.7.10.
> 
> I’m trying to go by the books (https://github.com/rbenv/rbenv). First I 
> installed rbenv and ruby-build ports via MacPorts. Ruby installation with 
> 
> rbenv install 3.4.1
> 
> was crushing due to missing psych. According to suggestions on the internet I 
> installed libyaml and openssl ports to help rbenv. The attempt with
> 
> RUBY_CONFIGURE_OPTS="--with-openssl-dir=/opt/local/lib 
> --with-libyaml-dir=/opt/local/lib" rbenv install 3.4.1
> 
> still fails with the following error:
> 
> ==> Downloading ruby-3.4.1.tar.gz...
> -> curl -q -fL -o ruby-3.4.1.tar.gz 
> https://cache.ruby-lang.org/pub/ruby/3.4/ruby-3.4.1.tar.gz
>  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
>                                 Dload  Upload   Total   Spent    Left  Speed
> 100 22.0M  100 22.0M    0     0  3835k      0  0:00:05  0:00:05 --:--:-- 4122k
> ==> Installing ruby-3.4.1...
> -> ./configure "--prefix=$HOME/.rbenv/versions/3.4.1" --enable-shared 
> --with-ext=openssl,psych,+ --with-openssl-dir=/opt/local/lib 
> --with-libyaml-dir=/opt/local/lib
> -> make -j 4
> *** Following extensions are not compiled:
> openssl:
>       Could not be configured. It will not be installed.
>       
> /private/var/folders/8b/02c2_ttj5hxc_479w0gykh3w0000gn/T/ruby-build.20250207113225.92490.SUnThV/ruby-3.4.1/ext/openssl/extconf.rb:26:
>  OpenSSL library directory could not be found in '/opt/local/lib/lib'. You 
> might want to fix this error in one of the following ways.
>         * Recompile OpenSSL by configuring it with --libdir=lib  to specify 
> the OpenSSL library directory.
>         * Recompile Ruby by configuring it with --libdir=<dir> to specify the 
> Ruby library directory.
>         * Compile this openssl gem with --with-openssl-include=<dir> and 
> --with-openssl-lib=<dir> options to specify the OpenSSL include and library 
> directories.
>       Check 
> /var/folders/8b/02c2_ttj5hxc_479w0gykh3w0000gn/T/ruby-build.20250207113225.92490.SUnThV/ruby-3.4.1/ext/openssl/mkmf.log
>  for more details.
> psych:
>       Could not be configured. It will not be installed.
>       Check 
> /var/folders/8b/02c2_ttj5hxc_479w0gykh3w0000gn/T/ruby-build.20250207113225.92490.SUnThV/ruby-3.4.1/ext/psych/mkmf.log
>  for more details.
> 
> BUILD FAILED (macOS 11.7.10 on x86_64 using ruby-build 20250130)
> 
> Now rbenv doesn’t see openssl as well. Any help on how to resolve this issues 
> would be greatly appreciated. Thank you and have a wonderful day ahead!
> 
> —
> Best wishes,
> Maxim
> 
> Maxim Abalenkov \\ [email protected]
> +44 7 486 486 505 \\ www.maxim.abalenkov.uk

Reply via email to