libmysqlclient15-dev on macs?

Viewed 52057

Does OSX need an install of libmysqlclient15-dev? I'm trying to compile a gem that is failing and a lot of sources says to install "libmysqlclient15-dev" but I only see this for Linux, not OSX. Am I missing something here?

7 Answers

I know this is old, but google got me here. So let's say the solution in 2018 for python3 on OSX.

brew install mysql-client echo 'export PATH="/usr/local/opt/mysql-client/bin:$PATH"' >> ~/.bash_profile source ~/.bash_profile pip install mysqlclient

I just had the same problem and only got a partial working solution. Here are the steps I made to make it work:

  • brew install mysql-client
  • brew install mysql-connector-c

IF YOU HAVE ZSH:

  • echo 'export PATH="/usr/local/opt/mysql-client/bin:$PATH"' >> ~/.zshrc

  • source ~/.zshrc

ELSE:

  • echo 'export PATH="/usr/local/opt/mysql-client/bin:$PATH"' >> ~/.bash_profile

  • source ~/.bash_profile

Now for the installation itself:

  • LDFLAGS=-L< your openssl lib folder location > pip install mysqlclient==< version >

for example: LDFLAGS=-L/usr/local/opt/openssl/lib pip install mysqlclient==1.3.12

brew install mysql
then
arch -x86_64 gem install mysql2 -v 0.5.3 -- --srcdir=/usr/local/mysql/include
Afterwards I was able to run bundle install.

Copied from Bragadeesh Jegannathan's blog post

Related