title: How do I fix mismatching dependencies in my Cargo file to work around native library collisions?
body: <p>I'm setting up a Rust server with <a href="https://rocket.rs/guide/getting-started/" rel="nofollow noreferrer">Rocket</a> and I'm trying to use it with <a href="https://github.com/Keats/jsonwebtoken" rel="nofollow noreferrer">a JWT library</a>. They use different versions of the *ring* crate and I get an error during <code>cargo build</code>:</p>
  
  <pre class="lang-none prettyprint-override"><code>error: multiple packages link to native library `ring-asm`, but a native library can be linked only once
  
  package `ring v0.12.1`
      ... which is depended on by `jsonwebtoken v4.0.1`
      ... which is depended on by `auther v0.1.0 (file:///home/drpytho/x/downloadble/auther)`
  links to native library `ring-asm`
  
  package `ring v0.11.0`
      ... which is depended on by `cookie v0.9.2`
      ... which is depended on by `rocket v0.3.6`
      ... which is depended on by `rocket_codegen v0.3.6`
      ... which is depended on by `auther v0.1.0 (file:///home/drpytho/x/downloadble/auther)`
  also links to native library `ring-asm`
  </code></pre>
  
  <p>My Cargo.toml</p>
  
  <pre><code>[package]
  name = "auther"
  version = "0.1.0"
  authors = ["Name &lt;Email@mail.se&gt;"]
  
  [dependencies]
  rocket = "0.3.6"
  rocket_codegen = "0.3.6"
  jsonwebtoken = "4"
  serde_derive = "1"
  serde = "1"
  </code></pre>
  
  <p>I read that you are supposed to fix the mismatching dependencies in your Cargo file, but I can't figure out how to do it.</p>