-
Notifications
You must be signed in to change notification settings - Fork 549
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ld: library not found for -lssl
after Mac OS Sierra upgrade
#795
Comments
ld: library not found for -lssl
after Mac OS Sierra upgrade
The solution was: I really wish XCode would update without removing the command line tools every time without notice. |
Oh, glad you found it. Yeah, that's annoying every time. Maybe a specific check is in order? I wonder if |
Hm this didn't work for me still seeing same error |
This error occurred for me trying to install (posting this so hopefully future poor souls googling |
I encountered this error when using |
@rietta saves my life... When the first time I try |
I have command line tools installed as well as Xcode 9. I tried reinstalling command line tools by
Update: I got it working after doing |
exactly same error as @mastahyeti Even after making a: brew install openssl@1.1 |
come be back to ruby 2.4.0 and all works fine. ps
|
@rietta thank you. I installed perl with homebrew and then kept getting this error message when trying to install DBD::mysql. After running |
Step 1.
Step 2.
|
I had upgraded from Sierra to High Sierra a couple of weeks back. I received this error when I tried to install mysqlclient. After running |
Changing the sudo gem install mysql2 -- --with-cflags=\"-I/usr/local/opt/openssl/include\" --with-ldflags=\"-L/usr/local/opt/openssl/lib\" |
I had this error while trying to install the Thanks a lot for the info |
I've tried all of the above and nothing has worked. Please help! I think what is happening is the install is failing to find a mysql package. Specifically, one named -l-lpthread. See at the bottom of my error:
` |
Well this looks like a problem, |
Thank you @dibowei |
Thank you very much @dibowei, same thing happened in OS X 10.14 Mojave, this fixed it. |
You can also try this on macOS
|
Could be a solution setting multiple paths like |
To fix for a manual gem install: brew install openssl
gem install mysql2 -- --with-opt-dir="$(brew --prefix openssl)" To fix for all bundle installs: brew install openssl
bundle config --global build.mysql2 --with-opt-dir="$(brew --prefix openssl)"
bundle install |
This thread ranks highly in Google. For other people arriving here after trying to get mysql2 gem going on OS X 10.14 Mojave, this did it for me. Stuck it in |
Thank you so much, worked for me after all hit and tries. |
thank you bro!!! |
if anyone is facing issue while installing
|
I faced the same issue in MAC OS Catalina. A slight variation of the above solutions/workarounds helped me solve the issue: |
Can;t install latest version of 0.3.21. 0.5 installs fine but doesn't work with my old app (rails 3.0). Same error as above but suggested fixes don;t work... Help us Obi-wan, you;re are only hope... gem install mysql2 -v '0.3.21'
/Users/kevin/.rvm/rubies/ruby-2.2.2/bin/ruby -I /Users/kevin/.rvm/rubies/ruby-2.2.2/lib/ruby/site_ruby/2.2.0 -r ./siteconf20200330-84858-1tm56nc.rb extconf.rb
|
I had to re-link brew openssl library after xcode update. Read this for more info https://stackoverflow.com/a/39244687/2133399 thanks @rietta |
Thanks @rietta, still works in 2020. Kudos 👍 |
Apple never fixes their bugs. Another exhibit is recovery console still goes to sleep during long running disk imaging operations with shenanigans to keep it awake. It's GOT ONE JOB TO DO! |
I had problem installing psycopg2 with error message
on macos Big Sur devBeta 2, xcode 12 Beta and command line tools all installed.
solved the problem right away. |
Also helped me, many thanks! I didn't realize brew was so buggy. I brew installed plantuml and suddenly couldn't get my existing rails application to work. I did
Versions: |
In my case, I was having trouble installing brew link openssl This failed with a denied error, but prompted me the right steps For compilers to find openssl@1.1 you may need to set:
export LDFLAGS="-L/usr/local/opt/openssl@1.1/lib"
export CPPFLAGS="-I/usr/local/opt/openssl@1.1/include" I then passed the correct linker flags and it worked (later updated my bashrc) sudo env LDFLAGS="-I/usr/local/opt/openssl@1.1/include -L/usr/local/opt/openssl@1.1/lib" pip install MySQL-python Later, set the flags in your bash profiles. God damn, clang/openssl on Mac. |
@dibowei I am trying to install Postgres, and your solution is what worked. How did you figure it out? |
If you're using openssl installed by homebrew natively on Apple Silicon,
|
@dibowei's solution worked but with modified for Apple M1 |
This solution deserves its own documentation repo, with different fixes for the platforms, along with PRs to fix them! 😄 |
I use Mac os Catalina 10.15.7 (19H524). This worked for me. Thank you. |
This worked for me. Thanks! |
This worked !! Thanks!! |
That also worked for me on intel mac with MacOS Monterrey installed |
Since the default shell on MacOS is now zsh the fixes in this thread no longer worked. It did work after changing the shell to bash. I hope my pain will help others. |
This is really work.Thank you so much. |
MacOS Monterey Check your installed mysql version(i'm using 8.0.28_1) Change the bundle.mysql2 config (change '8.0.28_1' for the mysql installed version)
Run: |
@edubevilacqua this just worked for macOS Sonoma! Thank you! |
Works perfectly! Thank you! |
After upgrading to Sierra. Confirmed that OpenSSL and LibreSSL are installed through Homebrew. I'm continuing to troubleshoot.
The text was updated successfully, but these errors were encountered: