Monday 24 February 2020

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

Trying to run an older version of PHP via homebrew for development of an old codebase I get an error that libcrypto.1.0.0 is not found:

/usr/local/Cellar/php@5.6/5.6.40/bin/php -v
dyld: Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib
  Referenced from: /usr/local/Cellar/php@5.6/5.6.40/bin/php
  Reason: image not found
zsh: abort      /usr/local/Cellar/php@5.6/5.6.40/bin/php -v

Easily sorted by installing an appropriate libcrypto like so:
brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

And it's working!
/usr/local/Cellar/php@5.6/5.6.40/bin/php -v
PHP 5.6.40 (cli) (built: Apr 23 2019 11:14:34)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies