FFI::NotFoundError (Function 'OPENSSL_init_ssl' not found in [libssl.dylib])

486 views Asked by At

I'm using Mac OS for development. Now I'm developing an app using Blockcypher API. With Ruby on Rails, when I try to send money using the Gem, it always return this error

FFI::NotFoundError (Function 'OPENSSL_init_ssl' not found in [libssl.dylib])

Already try to upgrade or downgrade the OpenSSL version on my mac but nothing happend and it so frustating. My friend on linux doesn't get this error, work perfectly on his device. Has anyone ever got this error?

1

There are 1 answers

0
Pablo Alejandro On

I had the same problem, after research for one day I found the solution for rvm ruby-2.7.2 version:

  1. Install openssl version 1.1:

brew update & brew upgrade & brew install [email protected]

  1. cd in your openssl lib folder in my case: /usr/local/opt/[email protected]/lib copy files to /usr/lib

cd /usr/local/opt/[email protected]/lib

  1. Copy the libssl.1.1.dylib file

sudo cp libssl.1.1.dylib libcrypto.1.1.dylib /usr/local/lib/

  1. make softlink

sudo ln -s libssl.1.1.dylib libssl.dylib

sudo ln -s libcrypto.1.1.dylib libcrypto.dylib

  1. Reinstall ruby with openssl version:

rvm reinstall 2.7.2 --with-openssl-dir=/usr/local/opt/[email protected]

References github issues, stackoverflow.