user51
user51

Reputation: 10163

installing the mysqlclient library in mac OS

I'm trying to demo rust database program using diesel.rs library.

I'm following the getting started steps here.

As mentioned in this page, I got below error while running the command cargo install diesel_cli.

note: ld: library not found for -lmysqlclient
clang: error: linker command failed with exit code 1 (use -v to see invocation)

The solution is given in the next step as well in same page as below.

   You can resolve this issue by either installing the library (using the usual way to do this depending on your operating system) or by specifying the backends you want to install the CLI tool with.

But I don't know how to do this in my mac OS. I tried the below commands.

brew install mysqlclient
brew install lmysqlclient

But brew couldn't find any such repo. Please help me how to resolve this error and install mysqlclient library in my mac OS.

Upvotes: 3

Views: 10099

Answers (1)

justinas
justinas

Reputation: 6857

mysql-connector-c seems to be the homebrew package you are looking for. Libmysqlclient should also be installed when installing the mysql brew package.

Upvotes: 8

Related Questions