DEV Community

Shintaro Kaneko
Shintaro Kaneko

Posted on

1

Troubleshooting `ld: library not found for -lssl'

Trouble

linking shared-object mysql2/mysql2.bundle                                                              
ld: library not found for -lssl                                                                         
clang: error: linker command failed with exit code 1 (use -v to see invocation)                                             
make: *** [mysql2.bundle] Error 1                                                                       

make failed, exit code 2                            

I got the error during executing gem install mysql2. It seems that the linkable library path is not configured correctly on Mojave.

Shooting

Invoking the command with LIBRARY_PATH to be able to find out the openssl library explicitly.

$ LIBRARY_PATH=$LIBRARY_PATH:/usr/local/opt/openssl/lib gem install mysql2

That's all. 😎

Sentry image

Hands-on debugging session: instrument, monitor, and fix

Join Lazar for a hands-on session where you’ll build it, break it, debug it, and fix it. You’ll set up Sentry, track errors, use Session Replay and Tracing, and leverage some good ol’ AI to find and fix issues fast.

RSVP here →

Top comments (0)

Billboard image

Create up to 10 Postgres Databases on Neon's free plan.

If you're starting a new project, Neon has got your databases covered. No credit cards. No trials. No getting in your way.

Try Neon for Free →

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay