enter image description here

while building substrate node template versions: polkadot-v0.9.19, polkadot-v0.9.27 get the below error rustup version

nightly-2022-02-15-x86_64-unknown-linux-gnu (default)
rustc 1.60.0-nightly (c5c610aad 2022-02-14)

2 Answers 2


Just simply do this (you don't have to modify the lock file manually):

cargo update -p syn --precise 1.0.96

If you have the plan to update your Substrate version.

Update the Substrate to this commit, which could fix this problem permanently.

  • error: failed to select a version for the requirement syn = "^1.0.98"`` Aug 17, 2022 at 8:00
  • looks like we need version above or equal to syn = "^1.0.98"; which has the same error message of being private Aug 17, 2022 at 8:03
  • 1
    You need to downgrade other dep first. I guess it is cargo update -p ctor --precise 0.1.22. Aug 17, 2022 at 8:30

Downgrade your current syn version 1.0.99 into 1.0.96 in my case


  • Go to Cargo.lock
  • Search name = "syn" in Cargo.lock
  • Delete checksum line of syn
  • Replace 1.0.99 by 1.0.96
  • cargo build --release again

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.