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

Viewed 43379

Using electron-builder to build Windows app, When signing up, I got this error :

dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
  Referenced from: /Users/puss/Library/Caches/electron-builder/winCodeSign/winCodeSign-1.7.0/darwin/osslsigncode
  Reason: image not found
12 Answers

If you are in MacOS 10.15 (Catalina), try this (reinstall openssl):

brew update && brew upgrade
brew uninstall openssl
brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

Just switch to 1.0.2t version, using this command:

brew switch openssl 1.0.2t

For me, re-installing openssh (not openssl) was the only solution.

brew remove openssh
brew install openssh

Thanks unifreak, I fixed this problem on macOS v10.11.6 at Tue Apr 28 2020 again.

REF: https://stackoverflow.com/a/59224109/686105

  1. Update homebrew index and upgrade. (option)

    [ chusiang@osx_el_capitan ~ ]
    $ brew update && brew upgrade
    
  2. Try to remove the openssl@1.1.

    [ chusiang@osx_el_capitan ~ ]
    $ brew uninstall openssl@1.1
    Error: Refusing to uninstall /usr/local/Cellar/openssl@1.1/1.1.1g
    because it is required by ansible-lint, atk, cairo, gdk-pixbuf, glib, gnupg, gnutls, gobject-introspection, gsettings-desktop-schemas, gtk+3, gtk-doc, harfbuzz, ipmitool, ipython, irssi, itstool, krb5, libevent, libfido2, libpq, libssh, libssh2, libxml2, macvim, meson, nmap, openssh, pango, pgcli, postgresql, python, python@2, python@3.8, ruby, rust, s3cmd, sdcv, sphinx-doc, sshuttle, tcpdump, tmate, tmux, travis, unbound, vim, w3m, wget and zenity, which are currently installed.
    You can override this and force removal with:
      brew uninstall --ignore-dependencies openssl@1.1
    
  3. Remove the openssl@1.1 with --ignore-dependencies args.

    [ chusiang@osx_el_capitan ~ ]
    $ brew uninstall --ignore-dependencies openssl@1.1
    Uninstalling /usr/local/Cellar/openssl@1.1/1.1.1g... (8,052 files, 18.4MB)
    
  4. Install the specific version of openssl v1.0.0.

    [ chusiang@osx_el_capitan ~ ]
    $ brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
    
  5. Lock the openssl version with v1.0.0.

    [ chusiang@osx_el_capitan ~ ]
    $ brew pin https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
    
  6. Add this openssl into $PATH.

    [ chusiang@osx_el_capitan ~ ]
    $ echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile
    
  7. Apply this change of $PATH.

    [ chusiang@osx_el_capitan ~ ]
    $ source ~/.bash_profile
    
  8. DONE.

    [ chusiang@osx_el_capitan ~ ]
    $ openssl version
    OpenSSL 1.0.2t  10 Sep 2019
    

Finally, the ssh / git / ansible were back !

Here's what worked for me

brew update && brew upgrade
brew uninstall --ignore-dependencies openssl 
brew install openssl

I had the same problem. In my case, for a legacy Rails 2.4 app. It seems brew had updated /usr/local/opt/openssl to symlink to openssl@1.1/1.1.1d.

After trying several other things, I fixed it by manually updating the symlink /usr/local/opt/openssl to point to the 1.0.2s version that was already on my system:

MacBook-Pro/usr/local/opt(:|✔) % pwd
/usr/local/opt
MacBook-Pro/usr/local/opt(:|✔) % ll openssl*
lrwxr-xr-x  1 dhempy  admin  24 Feb 19 11:36 openssl -> ../Cellar/openssl/1.0.2s
lrwxr-xr-x  1 dhempy  admin  28 Feb 19 08:55 openssl@1.1 -> ../Cellar/openssl@1.1/1.1.1d

Hopefully this is one-and-done for me, and I won't have to reapply that symlink after every update.

brew doctor gave me the following warning:

Warning: Some installed formulae are missing dependencies.
You should `brew install` the missing dependencies:
  brew install openssl@1.1

this command fixed my issue

brew install openssl@1.1

Reinstalling watchman with brew solved the issue for me :

brew remove watchman

brew install watchman

I hope it helps,

This is the process I had to use to fix this issue. I am not sure how to use brew extract correctly.

We need openssl in order to use wget.

brew install openssl

Now, download version 1.0.2t and install it.

wget https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb
brew install openssl.rb

If you are using a conda env, simply use

conda install -c bioconda samtools openssl=1.0

I had to run these commands because my problematic package appeared to be ldns:

brew uninstall --ignore-dependencies ldns
brew install ldns
Related