我正在尝试构建同时使用 hyper 和 git2 的东西。现在我遇到了openssl被链接两次的问题。Shepmaster的提示将我带到Cargosfeatures
Cargos ,我尝试了,但我仍然卡住了。
我遇到的确切错误cargo build
如下:
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
据我所知,git2 和 hyper 都需要 openssl。有谁知道我做错了什么?由于我禁用了 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
这是Cargo.lock以防万一。