LoginSignup
1
0

More than 5 years have passed since last update.

all possible versions conflict with previously selected versions エラーの対処方法

Posted at

Rustで開発していて、依存関係を Cargo.toml に追加し、 cargo buildcargo tree などを実行して下記のようなエラーが出た場合の対処方法です。

all possible versions conflict with previously selected versions of `lazy_static`
  version 0.2.2 in use by lazy_static v0.2.2
  possible versions to select: 0.2.8, 0.2.7, 0.2.6

Cargoのキャッシュを更新してあげないと、昔のビルド時のモジュール・バージョンを使ってしまいます。 (Cargo.lock に記録されています。)

cargo update を実施して依存ツリーの再構築を行いましょう。

cargo update
    Updating registry `https://github.com/rust-lang/crates.io-index`
    Updating lazy_static v0.2.2 -> v0.2.8
    :

これで昔のモジュール・バージョンへの参照から新しいモジュール・バージョンへの参照に切り替わります。
本当にコンフリクトしていたらなおらないけどね。

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