macosopensslhomebrewvapor

dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib


I installed vapor via homebrew and then immediately wanted to jump into a project by executing vapor new Hello but then got the following message back in the terminal:

dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/bin/vapor
Reason: image not found
zsh: abort      vapor new Hello

I tried some approaches to fix this like uninstalling and reinstalling openssl via brew but that didn't work . Also tried something I found in the internet but nothing worked. I assume it has something to do with vapor only working with version 1.0.0 but not 1.1.1 and that's what I have. I guess I need to downgrade to 1.0.0 but how'd I do that? I'm on MacOS Catalina if that matters.


Solution

  • Update: As of December 2020 and beyond, brew switch does not work, so use the other answer by @angabriel:

    brew install rbenv/tap/openssl@1.0
    ln -sfn /usr/local/Cellar/openssl@1.0/1.0.2t /usr/local/opt/openssl
    

    Original Answer: Switch to an older openssl package

    brew switch openssl 1.0.2s
    

    Or, depending on your exact system configuration, you may need to switch to a different version. Check the output of ls -al /usr/local/Cellar/openssl for the version number to switch to.

    brew switch openssl 1.0.2q
    # or
    brew switch openssl 1.0.2r
    # or 
    brew switch openssl 1.0.2s
    # or
    brew switch openssl 1.0.2t
    # etc...