软件包XXX链接到本机库YYY,但与先前的软件包也链接到YYY冲突:软件包ZZZ

时间:2019-04-24 10:40:43

标签: rust rust-cargo

我有一个项目依赖xxx(xxx具有到本地c库'a'的链接),我想介绍一个新的依赖项yyy,它也具有指向'a'(某些库的不同版本)的链接。当我运行“货物更新”时,它成为事实并记录为“无法为xxx选择一个版本。...包xxx链接到本机库a,但与也链接到a的先前软件包: 包yyy'

我已经阅读了一些文档,通过在cargo.toml和build.rs中添加一些代码来使链接具有全局性似乎是可行的,但是我不确定该怎么做,并且两个不同的依赖项可以具有相同的链接吗? / p>

error: failed to select a version for `parity-rocksdb-sys`.
    ... required by package `parity-rocksdb v0.5.0`
    ... which is depended on by `kvdb-rocksdb v0.1.4`
    ... which is depended on by `storage v0.0.1 (/Users/chenrui/Desktop/blockchain/WendingWorkStation/ipfs/filesys-rust/runtime/storage)`
    ... which is depended on by `beacon v0.0.1 (/Users/chenrui/Desktop/blockchain/WendingWorkStation/ipfs/filesys-rust/chain/beacon)`
    ... which is depended on by `client v0.1.0 (/Users/chenrui/Desktop/blockchain/WendingWorkStation/ipfs/filesys-rust/chain/client)`
    ... which is depended on by `alphanet v0.1.0 (/Users/chenrui/Desktop/blockchain/WendingWorkStation/ipfs/filesys-rust/chain/alphanet)`
    ... which is depended on by `devnet v0.1.0 (/Users/chenrui/Desktop/blockchain/WendingWorkStation/ipfs/filesys-rust/chain/devnet)`
    ... which is depended on by `filesys v0.1.0 (/Users/chenrui/Desktop/blockchain/WendingWorkStation/ipfs/filesys-rust)`
versions that meet the requirements `^0.5` are: 0.5.5, 0.5.4, 0.5.3, 0.5.2, 0.5.1, 0.5.0

the package `parity-rocksdb-sys` links to the native library `rocksdb`, but it conflicts with a previous package which links to `rocksdb` as well:
package `librocksdb-sys v5.17.2`
    ... which is depended on by `rocksdb v0.12.0`
    ... which is depended on by `filecoin-proofs v0.1.0 (https://github.com/idotial/rust-fil-proofs.git#53676171)`
    ... which is depended on by `filesys v0.1.0 (/Users/chenrui/Desktop/blockchain/WendingWorkStation/ipfs/filesys-rust)`

failed to select a version for `parity-rocksdb-sys` which could resolve this conflict

fix this error, and finish cargo update

0 个答案:

没有答案