Skip to content
This repository has been archived by the owner on Nov 14, 2023. It is now read-only.

unable to install #45

Open
GopherJ opened this issue Sep 4, 2020 · 4 comments · May be fixed by #46
Open

unable to install #45

GopherJ opened this issue Sep 4, 2020 · 4 comments · May be fixed by #46

Comments

@GopherJ
Copy link

GopherJ commented Sep 4, 2020

    Updating git repository `https://github.com/kbknapp/cargo-count`
  Installing cargo-count v0.2.4 (https://github.com/kbknapp/cargo-count#eebe6f87)
    Updating crates.io index
error: failed to compile `cargo-count v0.2.4 (https://github.com/kbknapp/cargo-count#eebe6f87)`, intermediate artifacts can be found at `/tmp/cargo-installSJ1NfQ`

Caused by:
  failed to select a version for the requirement `clap = "~2.11.2"`
  candidate versions found which didn't match: 2.33.3, 2.33.2, 2.33.1, ...
  location searched: crates.io index
required by package `cargo-count v0.2.4 (/home/cheng/.cargo/git/checkouts/cargo-count-01e28dcffdb7943b/eebe6f8)`

@survived
Copy link

survived commented Oct 1, 2020

Clap maintainer has yanked all the versions up to 2.21.0 which caused this error. The only option (except waiting for the cargo-count author to update dependency) I can see so far — build it manually and put binary to ~/.cargo/bin.

@slerpyyy slerpyyy linked a pull request Oct 16, 2020 that will close this issue
@Fenex
Copy link

Fenex commented Jan 11, 2021

Easy install cargo-count with fix #46:

git clone https://github.com/kbknapp/cargo-count.git
cd cargo-count
git fetch origin pull/46/head:pr-46
git checkout pr-46
cargo install --path ./
# ready!
cargo count --all --unsafe-statistics --exclude target

@richardwhiuk
Copy link

cargo install --git https://github.com/slerpyyy/cargo-count --branch master works as a one liner.

@ekoutanov
Copy link

If you want to install from the original repo (rather than a forked one) with a yanked dependency, and assuming the repo has a Cargo.lock file (which it does in this case), you can use the --locked argument, as so:

cargo install --git https://github.com/kbknapp/cargo-count --branch master --locked

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants