IMO the best way to install openssl on MacOS is to use Homebrew. This will not only install openssl, but will also allow it to be upgraded in the future.

brew install openssl

If you want to make the Homebrew version the default (rather than the LibreSSL that comes with MacOS), you will also need put the Hombrew-installed openssl on your path ahead of the MacOS version. While it is possible to accomplish this by putting /opt/homebrew/bin on your PATH ahead of /usr/bin, I strongly discourage this, because it makes you vulnerable to unintentionally installing a malicious Homebrew package named something like ls that overrides your default ls with malicious code. Instead, my personal preference is to have a user-level directory where I maintain a small set of binaries that override the defaults.

# Create a user-level bin directory, if it doesn't already exist.
mkdir -p ~/bin

# Create a symlink to the Homebrew openssl, if such a symlink does not already exist
ln -fs /opt/homebrew/bin/openssl ~/bin/openssl

Then, put ~/bin on your PATH, ahead of /usr/bin. This part depends on which shell you are using. For bash, you can add this to your ~/.bash_profile.

# User-level binaries, manually added
PATH="${HOME}/bin:${PATH}"
Answer from Cameron Hudson on Stack Exchange
Top answer
1 of 3
3

IMO the best way to install openssl on MacOS is to use Homebrew. This will not only install openssl, but will also allow it to be upgraded in the future.

brew install openssl

If you want to make the Homebrew version the default (rather than the LibreSSL that comes with MacOS), you will also need put the Hombrew-installed openssl on your path ahead of the MacOS version. While it is possible to accomplish this by putting /opt/homebrew/bin on your PATH ahead of /usr/bin, I strongly discourage this, because it makes you vulnerable to unintentionally installing a malicious Homebrew package named something like ls that overrides your default ls with malicious code. Instead, my personal preference is to have a user-level directory where I maintain a small set of binaries that override the defaults.

# Create a user-level bin directory, if it doesn't already exist.
mkdir -p ~/bin

# Create a symlink to the Homebrew openssl, if such a symlink does not already exist
ln -fs /opt/homebrew/bin/openssl ~/bin/openssl

Then, put ~/bin on your PATH, ahead of /usr/bin. This part depends on which shell you are using. For bash, you can add this to your ~/.bash_profile.

# User-level binaries, manually added
PATH="${HOME}/bin:${PATH}"
2 of 3
2

The first option is the simplest one: do nothing. macOS has shipped with OpenSSL preinstalled since 2000.

You can download a binary distribution of OpenSSL. The OpenSSL project does not itself publish binary releases, but they maintain a list of third-party resources that publish OpenSSL binaries.

You can install it using MacPorts.

You can install it using Homebrew.

You can compile it yourself. You already downloaded the source code, so all you need is to follow the instructions in the INSTALL.md file you are showing in your screenshot. I assume that, since you chose to use an inofficial development version, you may run into some bugs.

🌐
Macupdate
openssl.macupdate.com › security › encryption & decryption
Download OpenSSL for Mac | MacUpdate
To install the OpenSSL toolkit and library on your Mac, you must open the Terminal application, go to the OpenSSL source folder, and follow the instructions from the INSTALL file included in the archive.
Discussions

macos - How to install latest version of openssl Mac OS X El Capitan - Stack Overflow
I have used brew install openssl to download and install openssl v1.0.2f, however, it comes back saying: A CA file has been bootstrapped using certificates from the system keychain. To add additio... More on stackoverflow.com
🌐 stackoverflow.com
macos - install openssl-devel on Mac - Stack Overflow
I need to install the openssl-devel on Mac. But I've tried brew and macport both. Neither of them work. And I have also googled this problem--- install openssl-devel on Mac. But, I did not find an More on stackoverflow.com
🌐 stackoverflow.com
Struggling to install ruby and rails because of OpenSSL?
Don't use RVM, try to use ASDF or MISE to install ruby More on reddit.com
🌐 r/ruby
42
10
December 11, 2024
Stuck on RVM Ruby Installation with OpenSSL Issues on EC2 - Need Help!
I was a long time rvm user, and then I ran into these issues (on a Mac M1 studio). I switched to asdf and that fixed the whole problem. asdf has its own idiosyncrasies to learn, but the ruby binary installed without an issue. Plus it can handle your JS versioning too! More on reddit.com
🌐 r/rails
14
2
August 28, 2024
🌐
MacPorts
ports.macports.org › port › openssl
Install openssl on macOS with MacPorts
To install openssl, run the following command in macOS terminal (Applications->Utilities->Terminal)
🌐
GitHub
gist.github.com › byronmansfield › 97d74d8b0d1ea28b48536020dbd6d53e
Install OpenSSL from source Mac OS X · GitHub
Here is what worked for me: sudo make install MANDIR=/usr/local/openssl/share/man MANSUFFIX=ssl That completed fine.
🌐
Homebrew
formulae.brew.sh › formula › openssl@3
Homebrew Formulae: openssl@3
brew install openssl@3 · Also known as: openssl, openssl@3.6 · Cryptography and SSL/TLS Toolkit · https://openssl-library.org · License: Apache-2.0 · Development: Pull requests · Formula JSON API: /api/formula/openssl@3.json · Formula ...
🌐
Medium
yasar-yy.medium.com › installing-openssl-library-on-macos-catalina-6777a2e238a6
Installing OpenSSL library on macOS Catalina | by Yaşar Yücel Yeşilbağ | Medium
September 18, 2020 - When an app wants to use a library, macOS searches several locations to find it. We have to find library path of OpenSSL and add it to DYLD_LIBRARY_PATH environment variable. For this purpose, run “brew info openssl” command again. ... The path in the red rectangle at above screenshot is the path where OpenSSL is installed.
Find elsewhere
🌐
Franz Inc.
franz.com › support › openssl-mac.lhtml
Installing OpenSSL on macOS
The latest information on OpenSSL can be found in the installation guide.
🌐
FixMyCert
fixmycert.com › guides › openssl-installation
Install OpenSSL: Windows, Linux, macOS, Alpine
... Security note: Download only from the official slproweb.com site over HTTPS and verify the publisher in the installer dialog before proceeding. ... Important: macOS does not ship with OpenSSL.
🌐
HPE Ezmeral
docs.ezmeral.hpe.com › datafabric-customer-managed › 80 › AdvancedInstallation › InstallingOpenSSL-for-mac-client.html
Installing OpenSSL for the Mac Client
OPENSSL_INSTALLED_LOCATION=`brew --prefix openssl@1.1` OPENSSL_LIBRARY_PATH=${OPENSSL_INSTALLED_LOCATION}/lib OPENSSL_PATH=${OPENSSL_INSTALLED_LOCATION}/bin export PATH=${OPENSSL_PATH}:${PATH} LD_LIBRARY_PATH=${OPENSSL_LIBRARY_PATH}:${LD_LIBRARY_PATH}
🌐
Patrickbougie
mac-dev-env.patrickbougie.com › openssl
Mac Dev Env: OpenSSL
tar -xzvf openssl-VERSION.tar.gz cd openssl-VERSION · Configure, compile and install into /usr/local/mac-dev-env/openssl-VERSION.
🌐
MacPorts
ports.macports.org › port › openssl3
Install openssl3 on macOS with MacPorts
To install openssl3, run the following command in macOS terminal (Applications->Utilities->Terminal)
🌐
Medium
medium.com › @rohitkumarkhatri › how-to-install-openssl-on-windows-macos-and-linux-a-beginners-guide-5c9add8ad9b3
How to Install OpenSSL on Windows, macOS, and Linux: A Beginner’s Guide | by Rohit Kumar | Medium
September 24, 2024 - It’s also a general-purpose cryptography library. Whether you’re a developer, a system administrator, or a security enthusiast, learning how to install OpenSSL can be incredibly useful. This guide will walk you through the steps for installing OpenSSL on Windows, macOS, and Linux.
🌐
Deepan Seeralan
deepanseeralan.com › tech › openssl-dev-on-macOS
Working with openssl in macOS - Deepan Seeralan
December 18, 2021 - brew installs the requested version of openssl into /usr/local/Cellar/ and creates a symlink at /usr/local/opt/openssl.
🌐
David Wampamba
blog.davidofug.com › how-to-update-openssl-on-macos
How to update Openssl on MacOS
December 19, 2024 - Does your MacBook have an unsupported version of OpenSSL? In this small article, I’ll show you how you can install the supported version in simple steps in the terminal. Verify the installed version Uninstall the old version Install the new versio...
🌐
Medium
medium.com › @timmykko › using-openssl-library-with-macos-sierra-7807cfd47892
Using the OpenSSL library with macOS Sierra | by Timothy Ko | Medium
January 14, 2018 - Instead, pass the full include/library paths to your compiler e.g.: -I/usr/local/opt/openssl/include -L/usr/local/opt/openssl/lib · But don’t worry! There’s a fix. Homebrew installs OpenSSL but doesn’t link it to /usr/local/include, where the compiler looks into during #include< …> Thus, you must manually link it instead:
🌐
Medium
smithua.medium.com › install-openssl-1-0-2t-version-on-macos-7084ac52fa8b
Install Openssl 1.0.2t version on macOS - Oleksandr Fesenko - Medium
November 12, 2020 - wget https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb · 2 - Run brew with the file downloaded: brew install openssl.rb · 3- Run brew switch to switch openssl to 1x version: brew switch openssl 1.0.2t · stackoverflow.com ...
🌐
Devolutions
blog.devolutions.net › home › how to manually install openssl on windows, linux, and macos
How to manually install OpenSSL on Windows, Linux, and macOS | Devolutions
September 11, 2020 - Learn how to manually install OpenSSL on Windows, Linux, and macOS with our detailed tutorial. Follow these steps to ensure secure connections and manage your SSL/TLS certificates efficiently.