An ghost error for installing diesel_cli on MacOX

…DIDSEL I HATE YOU…

Today when install Rust ORM framework: diesel. happened some ghost error.

let me found most resource to fixed it, so i note the solve case:

you need install mysql client or mysql-connector-c

RUSTFLAGS=”-L/usr/local/mysql/lib” cargo install diesel_cli — no-default-features — features mysql

The second error:

$ diesel -V
dyld: Library not loaded: @rpath/libmysqlclient.21.dylib
Referenced from: /Users/james/.cargo/bin/diesel
Reason: image not found
Abort trap: 6

You need to set the lib link like this:

sudo ln -s /usr/local/mysql/lib/libmysqlclient.21.dylib /usr/local/lib/libmysqlclient.21.dylib

sudo ln -s /usr/local/mysql/lib/libmysqlclient.dylib /usr/local/lib/libmysqlclient.dylib

when i use this way. that install done!!!

Hello, the magical chain world <_if> … <end_>