現象
cargo install diesel_cli
とすると以下のエラーが出て失敗する。
error: linking with `cc` failed: exit code: 1
(中略)
= note: ld: library not found for -lmysqlclient
clang: error: linker command failed with exit code 1 (use -v to see invocation)
解決方法
例えばPostgreSQLを使用するときは
cargo install diesel_cli --no-default-features --features "postgres"
とする。
環境:
- OS: macOS X 10.12.6
- Rust: 1.19.0
- Cargo: 0.20.0
- Diesel_cli: 0.15.0