0

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

1

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.

3
  • error: failed to select a version for the requirement syn = "^1.0.98"`` Commented 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 Commented 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.
    – AurevoirXavier
    Commented Aug 17, 2022 at 8:30
1

Downgrade your current syn version 1.0.99 into 1.0.96 in my case

Step:

  • 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
2
  • Isn't Cargo.lock autogenerated and it gets rewritten? Commented Dec 22, 2023 at 22:13
  • 1
    yeah. you should use cargo update -p syn --precise 1.0.96 instead of my solution
    – CocDap
    Commented Dec 24, 2023 at 16:05

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.