How to update Openssl on MacOS

David WampambaDavid Wampamba
2 min read

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.

  1. Verify the installed version

  2. Uninstall the old version

  3. Install the new version

  4. Update the path

  5. Reload the shell

  6. Verify

To uninstall and install OpenSSL, you will need to use the terminal app. And you need administrator privileges in order to be successful. So open the terminal app and follow the steps below.

  1. Verify the installed version

$ openssl version
  1. Uninstall unsupported version

$ brew uninstall openssl@1.1

Optionally, you might have to run an extra command in order to remove remnants or uninstall the unwanted OpenSSL version completely.

$ rm -rf /opt/homebrew/etc/openssl@1.0
  1. Install the current supported version

$ brew install openssl@3
  1. Update your PATH to use the new version

$ echo 'export PATH="/usr/local/opt/openssl@3/bin:$PATH"' >> ~/.zshrc
# Or if using bash:
# $echo 'export PATH="/usr/local/opt/openssl@3/bin:$PATH"' >> ~/.bashrc
# Update compiler flags for building software that uses OpenSSL
$ export LDFLAGS="-L/usr/local/opt/openssl@3/lib"
$ export CPPFLAGS="-I/usr/local/opt/openssl@3/include"
$ export PKG_CONFIG_PATH="/usr/local/opt/openssl@3/lib/pkgconfig"
  1. Reload your shell configuration

$ source ~/.zshrc
# or source ~/.bashrc if using bash
  1. Verify the installation

$ openssl version

If all is well, you will see something like this.

0
Subscribe to my newsletter

Read articles from David Wampamba directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

David Wampamba
David Wampamba

My journey as a self-taught developer began with a burning curiosity. Growing up in Uganda, where resources were scarce, I couldn't afford a formal education. Instead, I relied on handwritten notes from friends and online tutorials. As time went on, I got good at building websites for local businesses, each project proving my self-taught skills. But my dream of joining a major tech company seemed unreachable. Rejections piled up, all due to my academic background and self-doubt crept in. Then, a turning point. A friend I had shared my knowledge with landed a job at a promising startup in Kampala. He believed in me and recommended me. For five years now, I've been working remotely for that very company. They saw the potential in passionate, self-taught talent. But my heart is saddened by the millions in Uganda and the world facing the same challenges. That's why I am sharing my knowledge on this platform and other social platforms. My expertise is in PHP, JavaScript, WordPress, Technical Writing and business leadership. If you want to learn from me or collaborate, consider to follow or send me a on X.com/davidofug