0

I'm installing cocoapods like this sudo gem install cocoapods which gives me this error:

ERROR:  Loading command: install (LoadError)     
dlopen(/Users/pepa/.rbenv/versions/2.5.0/lib/ruby/2.5.0/x86_64-darwin16/openssl.bundle, 9):
Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib  
Referenced from: /Users/pepa/.rbenv/versions/2.5.0/lib/ruby/2.5.0/x86_64-darwin16/openssl.bundle 
Reason: image not found - /Users/pepa/.rbenv/versions/2.5.0/lib/ruby/2.5.0/x86_64-darwin16/openssl.bundle 
ERROR:  While executing gem ... (NoMethodError)
undefined method `invoke_with_build_args' for nil:NilClass

and sure enough this is empty:

ls: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib: No such file or directory

I've installed openssl using brew

brew list
autoconf        freetype        jansson         libgpg-error        libusb          openssl@1.1     readline        zlib
automake        gcal            jemalloc        libimobiledevice    libusbmuxd      p7zip           ruby
boost           gdbm            jpeg            libksba         libxml2         pcre            ruby-build
c-ares          gettext         libde265        libplist        libyaml         pkg-config      sphinx-doc
carthage        icu4c           libev           libpng          libzip          python@2        sqlite
coreutils       ideviceinstaller    libevent        libtasn1        lynx            python@3.9      usbmuxd
curl            ios-deploy      libffi          libtool         nghttp2         rbenv           xz

It's however possible that historically I've used MacPorts or even custom build.

I've tried most troubleshooting hints, e.g. from here: uWSGI can not load libssl.1.0.0.dylib

PerfectGamesOnline.com
  • 1,774
  • 1
  • 18
  • 31

1 Answers1

0

I've found the library elsewhere on the system, copied it and it works. I'm not proud of it but it works.

cp /Applications/MAMP/Library/lib/libssl.1.0.0.dylib /usr/local/opt/openssl/lib/
cp /Applications/MAMP/Library/lib/libcrypto.1.0.0.dylib /usr/local/opt/openssl/lib/
PerfectGamesOnline.com
  • 1,774
  • 1
  • 18
  • 31