使用git2和hyper:openssl多次链接

使用git2和hyper:openssl多次链接,openssl,rust,rust-cargo,hyper,Openssl,Rust,Rust Cargo,Hyper,我正在尝试构建同时使用hyper和git2的东西。现在我遇到了openssl链接两次的问题。一个提示引导我找到货物功能,我试过了,但还是卡住了 我遇到的确切错误是货物构建: 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 depen

我正在尝试构建同时使用hyper和git2的东西。现在我遇到了openssl链接两次的问题。一个提示引导我找到货物
功能
,我试过了,但还是卡住了

我遇到的确切错误是
货物构建

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.7.17
  openssl-sys v0.9.1
据我所知,openssl是git2和hyper所必需的。有人知道我做错了什么吗?由于我禁用了hyper的默认功能(以及cookie),openssl应该不再需要了。我已经查看了锁文件,看看是否有任何其他东西需要
openssl
,但我找不到任何东西。但我仍然得到了错误。不幸的是,cargo没有告诉我依赖性来自哪里

这是我的
Cargo.toml
的依赖项部分和锁文件:

[dependencies]
openssl = "0.9.1"
hoedown = "5.0.0"
iron = "0.4.0"
webbrowser = "0.1.3"
router = "0.4.0"
staticfile = "0.3.1"
clap = "2.18.0"
lazy_static = "0.2.2"
linked-hash-map = "0.3.0"
params = "0.5.0"
git2 = "0.6.1"

[dependencies.yaml-rust]
version = "0.3.4"
features = ["preserve_order"]

[dependencies.hyper]
version = "0.9.12"
default-features = false

[dependencies.cookie]
version = "0.2.5"
default-features = false

下面是我们感兴趣的案例。

问题在于params和openssl的组合:

[dependencies]
openssl = "0.9.1"
params = "0.5.0"
需要多部分0.8,具有功能
server
,但
默认功能=false

[dependencies.multipart]
features = ["server"]
version = "0.8"
这意味着也将需要。而hyper(使用默认功能)需要openssl 0.7


在hyper中,有一种方法可以切换到更新的openssl版本

谢谢!我只想解析一个发布的JSON主体。好的,我只需要删除params,然后找其他方法来做。@Machisuji我为params创建了一个可以解决这个问题的工具。@Machisuji它已经被修复,您的原始示例现在正在运行,因为params 0.5.0现在将被修复。