New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot install diesel_cli without mysql #818

Closed
Gurpartap opened this Issue Mar 22, 2017 · 4 comments

Comments

Projects
None yet
5 participants
@Gurpartap

Gurpartap commented Mar 22, 2017

$ cargo install diesel_cli
   ...
   ...
   Compiling diesel_cli v0.12.0
   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)
$ brew install mysql
$ cargo install diesel_cli
   ...
   ...
   Compiling diesel_cli v0.12.0
    Finished release [optimized] target(s) in 68.30 secs
  Installing /Users/Gurpartap/.cargo/bin/diesel

diesel_cli v0.12.0
Rust 1.16.0
macOS 10.12.3

@Eijebong

This comment has been minimized.

Member

Eijebong commented Mar 22, 2017

cargo install diesel_cli --features postgres,sqlite will allow you to compile diesel_cli without mysql support

@killercup

This comment has been minimized.

Member

killercup commented Mar 22, 2017

@sgrif

This comment has been minimized.

Member

sgrif commented Mar 22, 2017

Yes. We install with all supported backends by default, you need to specify --no-default-features --features whatever,backends to disable certain ones. Once compile_error! is stable we'll probably switch to no backends by default.

@sgrif sgrif closed this Mar 22, 2017

@thombles

This comment has been minimized.

thombles commented Jul 11, 2017

A note for anyone finding this later—features are space-separated so the working command is:

cargo install diesel_cli --no-default-features --features "postgres sqlite"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment