JoeCode

Reinstall Ruby-2.7.3 And Fix Openssl Issues

Jun 06, 2024

My M1 Macbook Pro has issues with OpenSSL and Ruby. I used the following commandline incantations to get it operational:

brew reinstall openssl@1.1
brew unlink openssl && brew link openssl@1.1 --force

echo 'export PATH="/opt/homebrew/opt/openssl@1.1/bin:$PATH"' >> ~/.zshrc

export LDFLAGS="-L/opt/homebrew/opt/openssl@1.1/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@1.1/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@1.1/lib/pkgconfig"

rvm install ruby-2.7.3 --with-openssl-dir=/opt/homebrew/opt/openssl@1.1 --verify-downloads 1
...