Fixing That Nasty "SSL module is not available" Bug on macOS


1 min read
Fixing That Nasty "SSL module is not available" Bug on macOS

Messing up with Xcode is a recipe for disaster. I knew this when I installed an Xcode Beta alongside an existing version of Xcode. Suddenly, one of my Python apps stopped working with the following error:

Could not fetch URL xyz ... (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))

What the ... ?!? Copying Xcode tools around must have messed up the shared libraries. Specifically, with OpenSSL. Although, I seem to have previously installed a version of OpenSSL using Homebrew, it must have been overridden by Xcode's CLI tools setup. To make things even more interesting, it looks like macOS won't even ship with OpenSSL, but a different implementation (LibreSSL), which not all apps are compatible with. It's a mess.

Thankfully, I found a temporary solution. There is a Homebrew tap that installs OpenSSL 1.0 (unlike 1.1, which also doesn't seem to be widely supported). All we need to do is the following:

brew uninstall --ignore-dependencies openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb 

make sure you have that --ignore-dependencies flag set there, otherwise you'd cause brew to delete everything that depends on OpenSSL (which is frankly, everything).

Afterwards, things should be working normally again. At least, they did for me.


Homebrew
The Missing Package Manager for macOS (or Linux).

The 1% Journal
Previous article

The 1% Journal

Major improvements are not Big Bang events. Rather, they are the results of hundreds of small, but consistent adjustments.

Beware of the Silent Majority
Next article

Beware of the Silent Majority

To change a society, one needs to understand what they're fighting against. Sadly, the real "enemies" are not the ones in charge, but those that silently put them there.


Related Articles

This Week in Elixir and Erlang #5
4 min read
This Week in Elixir and Erlang #4
3 min read
This Week in Elixir and Erlang #3
3 min read
This Week in Elixir and Erlang #2
4 min read
This Week in Elixir and Erlang
2 min read
Elixir Tip: Case vs. With
3 min read

GO TOP