1

I gonna to install these pallets in node/Cargo.toml :

# pallet-authority-discovery = '3.0.0'
# pallet-im-online = '3.0.0'
# sc-authority-discovery = '0.9.0'
# sc-consensus-epochs = { version = '0.9.0' }
# sc-chain-spec = { version = '3.0.0' }
# sc-consensus-slots = '0.9.0'
# sc-consensus-babe = { version = '0.9.0' }
# sc-consensus-babe-rpc = { version = '0.9.0' }
# sc-finality-grandpa-rpc = '0.9.0'
# sc-network = '0.9.0'
# sc-sync-state-rpc = '0.9.0'
# sp-authority-discovery = '3.0.0'
# sp-consensus-babe = { version = '0.9.0' }

but i faced this error :

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 sp-api v3.0.0 ... which satisfies dependency sp-api = "^3.0.0" of package sp-consensus v0.9.0 ... which satisfies dependency sp-consensus = "^0.9.0" of package sp-consensus-babe v0.9.0 ... which satisfies dependency sp-consensus-babe = "^0.9.0" of package node-template v4.0.0-dev (/home/kianoush/projects/substrate-node-template/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.12.0 ... which satisfies dependency parity-util-mem = "^0.12" of package kvdb v0.12.0 ... which satisfies dependency kvdb = "^0.12.0" of package frame-benchmarking-cli v4.0.0-dev (https://github.com/paritytech/substrate.git?branch=polkadot-v0.9.32#5ea6d953) ... which satisfies git dependency frame-benchmarking-cli (locked to 4.0.0-dev) of package node-template v4.0.0-dev (/home/kianoush/projects/substrate-node-template/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

what the problem ? how can i solve this problem ?

[package]
name = "node-template"
version = "4.0.0-dev"
description = "A fresh FRAME-based Substrate node, ready for hacking."
authors = ["Substrate DevHub <https://github.com/substrate-developer-hub>"]
homepage = "https://substrate.io/"
edition = "2021"
license = "Unlicense"
publish = false
repository = "https://github.com/substrate-developer-hub/substrate-node-template/"
build = "build.rs"

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[[bin]]
name = "node-template"

[dependencies]
clap = { version = "4.0.9", features = ["derive"] }
futures = { version = '0.3.9', features = ['compat'] }
hex-literal = '0.3.1'
# pallet-authority-discovery = '3.0.0'
# pallet-im-online = '3.0.0'
# sc-authority-discovery = '0.9.0'
# sc-consensus-epochs = { version = '0.9.0' }
# sc-chain-spec = { version = '3.0.0' }
# sc-consensus-slots = '0.9.0'
# sc-consensus-babe = { version = '0.9.0' }
# sc-consensus-babe-rpc = { version = '0.9.0' }
# sc-finality-grandpa-rpc = '0.9.0'
# sc-network = '0.9.0'
# sc-sync-state-rpc = '0.9.0'
# sp-authority-discovery = '3.0.0'
# sp-consensus-babe = { version = '0.9.0' }
sp-keystore = '0.13.0'

sc-cli = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", features = ["wasmtime"] , branch = "polkadot-v0.9.32" }
sp-core = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
sc-executor = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", features = ["wasmtime"] , branch = "polkadot-v0.9.32" }
sc-service = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", features = ["wasmtime"] , branch = "polkadot-v0.9.32" }
sc-telemetry = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
sc-keystore = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
sc-transaction-pool = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
sc-transaction-pool-api = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
sc-consensus-aura = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
sp-consensus-aura = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
sp-consensus = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
sc-consensus = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
sc-finality-grandpa = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
sp-finality-grandpa = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
sc-client-api = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
sp-runtime = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
sp-timestamp = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
sp-inherents = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
sp-keyring = { version = "6.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
frame-system = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
pallet-transaction-payment = { version = "4.0.0-dev", default-features = false, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }

# These dependencies are used for the node template's RPCs
jsonrpsee = { version = "0.15.1", features = ["server"] }
sc-rpc = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
sp-api = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
sc-rpc-api = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
sp-blockchain = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
sp-block-builder = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
sc-basic-authorship = { version = "0.10.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
substrate-frame-rpc-system = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
pallet-transaction-payment-rpc = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }

# These dependencies are used for runtime benchmarking
frame-benchmarking = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
frame-benchmarking-cli = { version = "4.0.0-dev", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }

# Local Dependencies
node-template-runtime = { version = "4.0.0-dev", path = "../runtime" }

# CLI-specific dependencies
try-runtime-cli = { version = "0.10.0-dev", optional = true, git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }

[build-dependencies]
substrate-build-script-utils = { version = "3.0.0", git = "https://github.com/paritytech/substrate.git", branch = "polkadot-v0.9.32" }
vergen = '7.4.3'

[features]
default = []
# Dependencies that are only required if runtime benchmarking should be build.
runtime-benchmarks = [
    "node-template-runtime/runtime-benchmarks",
    "frame-benchmarking/runtime-benchmarks",
    "frame-benchmarking-cli/runtime-benchmarks",
]
# Enable features that allow the runtime to be tried and debugged. Name might be subject to change
# in the near future.
try-runtime = ["node-template-runtime/try-runtime", "try-runtime-cli"]
2
  • Include your dependencies in std feature section Dec 4, 2022 at 12:53
  • @MrishoLukamba in this Cargo.toml not ant [std] section
    – Mr Coder
    Dec 4, 2022 at 12:57

1 Answer 1

0

This should hopefully fix your problem:

cargo update -p [email protected] -p [email protected]
1
  • it dosent work man
    – Mr Coder
    Dec 5, 2022 at 16:58

Your Answer

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

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