Cargo crate pull failing

Hi,

I am seeing following error with cargo pulling the crate. Not sure how the additional "^" before hyper is being added. Verified cargo toml which looks good to me, Anyone got any suggestion??

error

error: failed to select a version for the requirement `hyper = "^0.14.24"` (locked to 0.14.26)
candidate versions found which didn't match: 0.14.24, 0.14.23, 0.14.22, ...

cargo.toml

[package]
name = "xxxxx"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
hyper = { version = "0.14.24", features = ["full"]}
tokio = { version = "1", features = ["full"] }
etcd-client = { version = "0.11.0", features = ["pub-response-field"] }
chrono = { version = "0.4.19"}
lazy_static = "1.4.0"
mockall = "0.11.3"
async-trait = "0.1.67"
mockall_double = "0.3.0"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
anyhow = "1.0.40"
kube = { version = "0.78.0", features = ["runtime", "derive"] }
k8s-openapi = { version = "0.17.0", features = ["v1_26"] }
futures = "0.3.17"
signal-hook = "0.3.15"

Thanks!!

^x.y.z is equivalent to x.y.z, I guess cargo is just emphsizing in the error message. the real cause is a version conflict somewhere in the dependency tree.

run cargo tree command to check. you can also try add some of the command line options, e.g. --invert, or --duplicates, etc.

1 Like

Thanks for the info, I will check.

That error doesn't make sense to me, because ^0.14.24 should be compatible with 0.14.26 that Cargo has chosen. Maybe try deleting Cargo.lock?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.