[solved]Native library `openssl` is being linked to by more than one version

cargo build --verbose
error: native library `openssl` is being linked to by more than one version of the same package, but it can only be linked once; try updating or pinning your dependencies to ensure that this package only shows up once

  openssl-sys v0.9.6
  openssl-sys v0.7.17

Is there an easy way to solve this?

I remove some unused crates in my project's Cargo.toml, it compiles successly now.

Similar post;