0

OS : centos stream 9
CPU : x86_64
Rust : 1.61
substrate : 2022-05 3.0
polkdadot : 0.9.20
substrate-front-end : 2022-02
node : 16.14

when i study
substrate Tutorials - Add the Nicks Pallet to your Runtime https://docs.substrate.io/tutorials/v3/add-a-pallet/

when i cargo check -p node-template-runtime , it show error
how install package which satisfies dependency

[lzh@c9 substrate-node-template]cargo check -p node-template-runtime
    Updating git repository `https://github.com/paritytech/substrate.git`
    Updating crates.io index
error: failed to select a version for `signature`.
    ... required by package `ecdsa v0.13.3`
    ... which satisfies dependency `ecdsa-core = "^0.13"` of package `k256 v0.10.4`
    ... which satisfies dependency `k256 = "^0.10.4"` of package `frame-support v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.22#616d33ea)`
    ... which satisfies git dependency `frame-support` of package `frame-system v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.22#616d33ea)`
    ... which satisfies git dependency `frame-system` of package `pallet-nicks v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.22#616d33ea)`
    ... which satisfies git dependency `pallet-nicks` of package `node-template-runtime v4.0.0-dev (/home/lzh/substrate-node-template/runtime)`
    ... which satisfies path dependency `node-template-runtime` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/home/lzh/substrate-node-template/node)`
versions that meet the requirements `>=1.3.1, <1.5` are: 1.4.0, 1.3.2, 1.3.1

all possible versions conflict with previously selected packages.

  previously selected package `signature v1.5.0`
    ... which satisfies dependency `signature = ">=1.3.1"` (locked to 1.5.0) of package `ed25519 v1.4.1`
    ... which satisfies dependency `ed25519 = "^1"` (locked to 1.4.1) of package `ed25519-dalek v1.0.1`
    ... which satisfies dependency `ed25519-dalek = "^1.0.1"` (locked to 1.0.1) of package `libp2p-core v0.30.2`
    ... which satisfies dependency `libp2p-core = "^0.30.0"` (locked to 0.30.2) of package `libp2p v0.40.0`
    ... which satisfies dependency `libp2p = "^0.40.0"` (locked to 0.40.0) of package `sc-cli v0.10.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.20#563f4820)`
    ... which satisfies git dependency `sc-cli` (locked to 0.10.0-dev) of package `frame-benchmarking-cli v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.20#563f4820)`
    ... which satisfies git dependency `frame-benchmarking-cli` (locked to 4.0.0-dev) of package `node-template v4.0.0-dev (/home/lzh/substrate-node-template/node)`

failed to select a version for `signature` which could resolve this conflict
0

1 Answer 1

0

You must use uniform dependencies for all crates! Using the tutorial suggests latest tag or explicitly calls out the correct to use tag for the template that is tagged latest at anytime.

You should update to use latest throughout. And you may need to update your Cargo.lock file to remove any confusion for cargo on deps.

1

Not the answer you're looking for? Browse other questions tagged or ask your own question.