Syfaro / fuzzysearch-cli

A tool to batch search images against FuzzySearch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Unable to build: cargo reports "failed to select a version for the requirement"

illixion opened this issue · comments

commented

Hey,

I'm having trouble building this package on my machine, have you ever encountered this error before? I couldn't find any fixes online. Cargo seems to not be able to find the required version of packages, even though they seem to be available in the registry.

This is on an M1 Mac mini, rust installed and updated through homebrew.

❯ cargo --version
cargo 1.55.0
❯ rustc --version
rustc 1.55.0
❯ cargo build
    Updating crates.io index
error: failed to select a version for the requirement `anyhow = "=1.0.44"`
candidate versions found which didn't match: 1.0.42, 1.0.41, 1.0.40, ...
location searched: crates.io index
required by package `fuzzysearch-cli v0.2.0 (/***/fuzzysearch-cli)`
❯ cargo update
    Updating crates.io index
error: failed to select a version for the requirement `clap = "^3.0.0-beta.5"`
candidate versions found which didn't match: 2.33.3, 2.33.2, 2.33.1, ...
location searched: crates.io index
required by package `fuzzysearch-cli v0.2.0 (/***/fuzzysearch-cli)`

Well that's super weird. I tried installing it on a different Linux machine without issue, unfortunately I don't have any M1 Macs right now to test it on.

You could try deleting the ~/.cargo/registry folder and seeing if that fixes it somehow? Those versions definitely exist, so my only guess is some kind of caching issue.

commented

Thanks, that worked! Maybe that's because I haven't used rust in a while and the local cache got borked or something.