Currently dealing with an issue building my chain where parity-util-mem is conflicting with parity-util-mem-ban duplicates and I don't know the exact way to specify a certain version for all dependencies to use as I installed lots of pallets. Here is the full error just for reference

Updating crates.io index
Updating git repository `https://github.com/substrate-developer-hub/pallet-did`

error: failed to select a version for parity-util-mem.

... required by package `sp-core v3.0.0`
... which satisfies dependency `sp-core = "^3.0.0"` of package `frame-support v3.0.0`
... which satisfies dependency `frame-support = "^3.0.0"` of package `frame-system v3.0.0`
... which satisfies dependency `frame-system = "^3.0.0"` of package `pallet-did v3.0.0 (https://github.com/substrate-developer-hub/pallet-did#8510c92b)`
... which satisfies git dependency `did` of package `node-template-runtime v2.0.0 (C:\Users\throwaway\Documents\GitHub\Argonaut-Chain\runtime)`
... which satisfies path dependency `node-template-runtime` (locked to 2.0.0) of package `node-template v2.0.0 (C:\Users\throwaway\Documents\GitHub\Argonaut-Chain\node)`

versions that meet the requirements ^0.9.0 are: 0.9.0

the package parity-util-mem links to the native library parity-util-mem-ban-duplicates, but it conflicts with a previous package which links to parity-util-mem-ban-duplicates as well: package parity-util-mem v0.7.0

... which satisfies dependency `parity-util-mem = "^0.7"` of package `kvdb v0.7.0`
... which satisfies dependency `kvdb = "^0.7.0"` (locked to 0.7.0) of package `sc-client-api v2.0.0`
... which satisfies dependency `sc-client-api = "^2.0.0"` (locked to 2.0.0) of package `node-template v2.0.0 (C:\Users\throwaway)\Documents\GitHub\Argonaut-Chain\node)`

Only one package in the dependency graph may specify the same links value. This helps ensure that only one copy of a native library is linked in the final binary. Try to adjust your dependencies so that only one package uses the links ='parity-util-mem' value. For more information, see https://doc.rust-lang.org/cargo/reference/resolver.html#links.

failed to select a version for parity-util-mem which could resolve this conflict

2 Answers 2


This mostly happens when updating the polkadot version and you have still an old conflicting polkadot dependency.

Try to stay consistent for each my-pallet/Cargo.toml version

For example when you use the following.

frame-support = { default-features = false, version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.22"}

Then you should always stay with the branch polkadot-v0.9.22.

It seams, that your node-template-runtime is v2.0.0, which has conflicting dependencies to your pallet pallet-did.


Checkout cargo tree, then you can easier see what versions are being used https://doc.rust-lang.org/cargo/commands/cargo-tree.html

  • tried using cargo tree for this, it just ended up giving the same errors as beforehand, no matter what command I run
    – Monty Jack
    May 21, 2022 at 19:39
  • Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.
    – Community Bot
    May 23, 2022 at 14:38
  • You need to upgrade your libraries and set a parity-util-mem manually in the Cargo.toml config
    – flipchan
    May 27, 2022 at 6:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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