aadeshere1.github.io icon indicating copy to clipboard operation
aadeshere1.github.io copied to clipboard

2024/12/10/fixing-zstd-library-not-found-issue-when-installing-mysql-gem-on-mac

Open utterances-bot opened this issue 1 year ago • 2 comments

Fixing zstd library not found issue when installing mysql gem on mac

http://blog.aadeshshrestha.com.np/2024/12/10/fixing-zstd-library-not-found-issue-when-installing-mysql-gem-on-mac.html

utterances-bot avatar Dec 17 '24 06:12 utterances-bot

Thanks for it

aadeshere1 avatar Dec 17 '24 06:12 aadeshere1

Thank you very much for this!

Just to add — we can also use the following command, which includes both OpenSSL and Zstd via --with-opt-dir:

gem install mysql2 -v '0.5.6' -- --with-opt-dir="$(brew --prefix openssl):$(brew --prefix zstd)"

And to make it work across all projects and Ruby versions on your machine, you can add it to your global Bundler config:

bundle config --global build.mysql2 "--with-opt-dir=$(brew --prefix openssl):$(brew --prefix zstd)"

poudelmadhav avatar Aug 05 '25 08:08 poudelmadhav