Closed Abhinickz closed 3 months ago
cargo-install and cargo-binstall tools uses .cargo/.crates.toml
to maintain a list of installed software and their version, so if you haven't updated it then it would still think the old version is installed.
BTW I don't see a better way, not every crate implements --version
and there's no guarantee they can even run at all.
That's assuming you trust the crate, running installed binary from cargo-install-update or cargo-binstall is kind of terrible.
What does "I have manually updated the atuin package" mean in this scenario?
What does "I have manually updated the atuin package" mean in this scenario.
Downloaded the tar gz from here https://github.com/atuinsh/atuin/releases/tag/v18.3.0 and replaced the binary $HOME/.cargo/bin/atuin
since I was getting this error:
$ cargo install-update atuin
Polling registry 'https://index.crates.io/'.
Package Installed Latest Needs update
atuin v18.2.0 v18.3.0 Yes
Updating atuin
INFO resolve: Resolving package: 'atuin'
WARN Failed to send quickinstall report for package atuin-18.3.0-aarch64-unknown-linux-musl: Failed to download from remote: could not HEAD https://warehouse-clerk-tmp.vercel.app/api/crate/atuin-18.3.0-aarch64-unknown-linux-musl.tar.gz: HTTP status client error (402 Payment Required) for url (https://warehouse-clerk-tmp.vercel.app/api/crate/atuin-18.3.0-aarch64-unknown-linux-musl.tar.gz)
WARN The package atuin v18.3.0 will be installed from source (with cargo)
Updating crates.io index
error: could not find `atuin` in registry `crates-io` with version `=18.3.0`
ERROR Cargo errored! ExitStatus(unix_wait_status(25856))
ERROR Fatal error:
x For crate atuin: subprocess /usr/bin/cargo install atuin --version 18.3.0 --force --root /home/pi/.cargo errored with exit status: 101
`-> subprocess /usr/bin/cargo install atuin --version 18.3.0 --force --root /home/pi/.cargo errored with exit status: 101
Updated 0 packages.
Failed to update atuin.
Packages are uniquely recorded in ~/.crates.toml
, your
original operation just moved some files around.
When I run cargo install atuin --version 18.3.0 --force --root /home/nabijaczleweli/.cargo
manually, that seems to work (or at least start working).
But that was run from the cargo-binstall
upcall for you.
Does /usr/bin/cargo install --root ~/.cargo -f --version =18.3.0 --registry crates-io atuin
(as would be run by cargo-update) work? Does /usr/bin/cargo install atuin
?
From /usr/bin/cargo
I'm assuming you're using a distribution Rust? If not (and it's from rustup or something), does the same thing but unadorned (cargo install ...
) work?
I think this might be a bug, we need to strip =
before passing version requirements to cargo-install
Looking st the command, I think cargo-binstall pass the right version?
I think it might be an issue in cargo, in cargo-binstall we just use cargo
, unless you defined the environment variable CARGO
opened an issue in cargo-bins/cargo-binstall#1891
No, --version
takes a version requirement (and also allows 1.2.3
as sugar for =1.2.3
). This reads to me as either archive/connectivity desync, or cargo version mismatch. only the OP knows
I think the previous error was due to some connectivity issue?
Updating crates.io index
warning: spurious network error (2 tries remaining): http parser error: stream ended at an unexpected time; class=Http (34)
warning: spurious network error (1 tries remaining): http parser error: stream ended at an unexpected time; class=Http (34)
error: failed to fetch `https://github.com/rust-lang/crates.io-index`
$ cargo install-update atuin
Polling registry 'https://index.crates.io/'.
Package Installed Latest Needs update
atuin v18.2.0 v18.3.0 Yes
Updating atuin
INFO resolve: Resolving package: 'atuin'
WARN Failed to send quickinstall report for package atuin-18.3.0-aarch64-unknown-linux-musl: Failed to download from remote: could not HEAD https://warehouse-clerk-tmp.vercel.app/api/crate/atuin-18.3.0-aarch64-unknown-linux-musl.tar.gz: HTTP status client error (402 Payment Required) for url (https://warehouse-clerk-tmp.vercel.app/api/crate/atuin-18.3.0-aarch64-unknown-linux-musl.tar.gz)
WARN The package atuin v18.3.0 will be installed from source (with cargo)
Updating crates.io index
Installing atuin v18.3.0
error: failed to compile `atuin v18.3.0`, intermediate artifacts can be found at `/tmp/cargo-installsIScfS`
Caused by:
failed to select a version for `env_logger`.
... required by package `atuin v18.3.0`
versions that meet the requirements `^0.11.2` are: 0.11.5, 0.11.4, 0.11.3, 0.11.2
the package `atuin` depends on `env_logger`, with features: `anstream` but `env_logger` does not have these features.
It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.
failed to select a version for `env_logger` which could resolve this conflict
ERROR Cargo errored! ExitStatus(unix_wait_status(25856))
ERROR Fatal error:
x For crate atuin: subprocess /usr/bin/cargo install atuin --version 18.3.0 --force --root /home/pi/.cargo errored with exit status: 101
`-> subprocess /usr/bin/cargo install atuin --version 18.3.0 --force --root /home/pi/.cargo errored with exit status: 101
Updated 0 packages.
Failed to update atuin.
$ /usr/bin/cargo install atuin --version 18.3.0 --force --root /home/pi/.cargo
Updating crates.io index
Installing atuin v18.3.0
error: failed to compile `atuin v18.3.0`, intermediate artifacts can be found at `/tmp/cargo-installyLxC2G`
Caused by:
failed to select a version for `env_logger`.
... required by package `atuin v18.3.0`
versions that meet the requirements `^0.11.2` are: 0.11.5, 0.11.4, 0.11.3, 0.11.2
the package `atuin` depends on `env_logger`, with features: `anstream` but `env_logger` does not have these features.
It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.
failed to select a version for `env_logger` which could resolve this conflict
$ /usr/bin/cargo install atuin
Updating crates.io index
warning: spurious network error (2 tries remaining): http parser error: stream ended at an unexpected time; class=Http (34)
Downloaded atuin v18.3.0
Downloaded 1 crate (94.9 KB) in 0.37s
Installing atuin v18.3.0
error: failed to compile `atuin v18.3.0`, intermediate artifacts can be found at `/tmp/cargo-installsbn91b`
Caused by:
failed to select a version for `env_logger`.
... required by package `atuin v18.3.0`
versions that meet the requirements `^0.11.2` are: 0.11.5, 0.11.4, 0.11.3, 0.11.2
the package `atuin` depends on `env_logger`, with features: `anstream` but `env_logger` does not have these features.
It has an optional dependency with that name, but that dependency uses the "dep:" syntax in the features table, so it does not have an implicit feature with that name.
failed to select a version for `env_logger` which could resolve this conflict
Packages are uniquely recorded in ~/.crates.toml, your original operation just moved some files around.
So one needs to update the updated version in ~/.crates.toml
after the manual update?
which cargo version are you using?
I think it's too old.
So one needs to update the updated version in ~/.crates.toml after the manual update?
Yes
which cargo version are you using? I think it's too old.
Yes, Debian 12 distribution rust version.
$ cargo --version
cargo 1.65.0
$ rustc --version
rustc 1.63.0
So one needs to update the updated version in ~/.crates.toml after the manual update?
Yes
Thanks, Please close this issue.
I have manually updated the
atuin
package butcargo-update
fails to recognize the updated package version and again tries to update whencargo install-update -a
runs.