Last active
August 6, 2022 04:29
-
-
Save goodanthony/7f765500842fd2400b4a1e73b79979c1 to your computer and use it in GitHub Desktop.
Install Ruby 3.1.2 MacOS error
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Truied to install Ruby 3.1.2 on MacOs and keep getting a build failed like bellow | |
BUILD FAILED (macOS 12.5 using ruby-build ) | |
Last 10 log lines: | |
The Ruby yaml extension was not compiled. | |
ERROR: Ruby install aborted due to missing extensions | |
Configure options used: | |
--prefix=/Users/devopsme/.rbenv/versions/3.1.2 | |
--enable-shared | |
--with-readline-dir=/usr/local/opt/readline | |
--with-openssl-dir=/usr/local/opt/[email protected] | |
CC=clang | |
LDFLAGS=-L/Users/devopsme/.rbenv/versions/3.1.2/lib -L/usr/local/opt/zlib/lib | |
CPPFLAGS=-I/Users/devopsme/.rbenv/versions/3.1.2/include -I/usr/local/opt/zlib/include | |
What worked | |
brew update | |
brew install tree | |
brew update-reset | |
Install OpenSSL 3 | |
brew install openssl@3 | |
then link | |
brew link openssl@3 | |
echo 'export PATH="/usr/local/opt/openssl@3/bin:$PATH"' >> ~/.zshrc | |
Had to uninstall rbenv and ruby-build and then reinstall with | |
brew install rbenv | |
brew install ruby-build | |
Then open a new terminal window and type | |
rbenv install 3.1.2 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment