1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

cargo installでfailed to select a version for the requirementが発生した場合の対処法

Posted at

記事の内容

cargo install で以下のエラーが発生しました
根本の解決になるかは分かりませんが、回避できた方法をメモしておきます

  failed to select a version for the requirement `schnorrkel = "^0.1"`
  candidate versions found which didn't match: 0.9.1, 0.9.0, 0.8.5, ...

エラーの内容

Cargo.toml内で指定しているライブラリのバージョンと実際に使えるバージョンが違うというようなエラーみたいです

対処法

Cargo.toml内に[dependencies](依存関係)の定義をしている箇所があります。

[dependencies]
substrate-primitives = { version = "*", path = "../core/primitives" }
node-runtime = { version = "*", path = "../node/runtime" }
node-primitives = { version = "*", path = "../node/primitives" }
sr-primitives = { version = "*", path = "../core/sr-primitives" }
rand = "0.6"
clap = { version = "~2.32", features = ["yaml"] }
tiny-bip39 = "0.6.0"
rustc-hex = "2.0"
substrate-bip39 = { git = "https://github.com/paritytech/substrate-bip39" }
schnorrkel = "0.1"
hex = "0.3"
hex-literal = "0.1"
parity-codec = "3.2"

この場合、エラーメッセージに出力されているmatchしたバージョンに変更します。

schnorrkel = "0.9.1"

このバージョンを変更すると一応エラーを回避できました。
ただし、依存関係のバージョンが変わるのでその後の処理が正常に動作するかは分かりません。

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?