I followed the instructions to install substrate-contracts-node. However, it failed with the following error:

% cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --force --locked

    Updating git repository `https://github.com/paritytech/substrate-contracts-node.git`
  Installing contracts-node v0.18.0 (https://github.com/paritytech/substrate-contracts-node.git#10f07a81)
    Updating crates.io index
error: failed to select a version for the requirement `libp2p = "^0.46.1"`
candidate versions found which didn't match: 0.45.1, 0.45.0, 0.44.0, ...
location searched: crates.io index
required by package `sc-cli v0.10.0-dev (https://github.com/paritytech/substrate#74a6370e)`
    ... which satisfies git dependency `sc-cli` (locked to 0.10.0-dev) of package `contracts-node v0.18.0 (/Users/xxx/.cargo/git/checkouts/substrate-contracts-node-cf7c16677784d274/10f07a8/node)`

I also tried using a specific tag, e.g.

cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.18.0 --force --locked

but the result was the same for v0.17.0 and v0.18.0. However, on v0.16.0 this error doesn't appear (but another one appears: error[E0658]: default values for const generic parameters are experimental).

I'm using macOS 12.5 (21G72) on a MacBook Pro M1 (14-inch, 2021). However, I tried running it on an Ubuntu machine and the behaviour was the same.

1 Answer 1


This is likely caused by an old Rust toolchain being used for the installation on your local machine.

You can check which toolchain is used by executing rustup show before the cargo install command.

This is the toolchain which works for me locally:

rustc 1.64.0-nightly (2643b1646 2022-07-27)

You can try using the same one by executing rustup override set nightly-2022-07-28 before the install command.

  • In addition to that, I had to install wasm32-unknown-unknown: rustup target add wasm32-unknown-unknown. After that it worked, thanks!
    – Ronin
    Aug 12, 2022 at 14:47

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.