最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

rust cargo - failed to select a version for `solana-pubkey` which could resolve this conflict - Stack Overflow

programmeradmin3浏览0评论

I am a newbie in rust world. I am trying to write a tool using solana crates. Here is my Cargo.toml files: ./jupiter-swap-api-client/Cargo.toml

[package]
name = "jupiter-swap-api-client"
version = "0.1.0"
description = ""
edition = { workspace = true }

[dependencies]
anyhow = "1"
serde = { version = "1.0.159", features = ["derive"] }
serde_json = "1.0.95"
solana-sdk = { workspace = true, version = "2.2.1" }
base64 = "0.13.1"
serde_qs = "0.12.0"
reqwest = { version = "0.11.20", features = ["json"] }

./utils/Cargo.toml

[package]
name = "utils"
version = "0.1.0"
description = ""
edition = { workspace = true }

[dependencies]
anyhow = "1"
reqwest = { version = "0.12.12", features = ["json"] }
serde = { version = "1.0.159", features = ["derive"] }

./dextrade/Cargo.toml

[package]
name = "dextrade"
version = "0.1.0"
description = ""
edition = { workspace = true }

[dependencies]
anyhow = "1"
tokio = { version = "1", features = ["full"] }
jupiter-swap-api-client = { path = "../jupiter-swap-api-client" }
utils = { path = "../utils" }
solana-sdk = { workspace = true, version = "2.2.1" }
solana-client = { workspace = true }
bincode = "1.3.3"
docopt = "1"
serde = { version = "1.0.198", features = ["derive"] }
serde-this-or-that = "0.4"
serde_json = "1.0.116"
log = "0.4.20"
config-file = "0.2.3"
pkg-config = "0.3.31"
reqwest = { version = "0.11.20", features = ["json"] }
spl-token = "7.0.0"

./Cargo.toml

[workspace]
members = [
    "jupiter-swap-api-client",
    "dextrade",
    "utils"
]

[workspace.package]
edition = "2021"

[workspace.dependencies]
solana-sdk = "1.14.23"
solana-client = "1.14.23"

When I was running: cargo run -p dextrade run .local/config.toml I got this error:

error: failed to select a version for `solana-pubkey`.
    ... required by package `solana-program v2.1.0`
    ... which satisfies dependency `solana-program = "^2.1.0"` of package `spl-token v7.0.0`
    ... which satisfies dependency `spl-token = "^7.0.0"` of package `dextrade v0.1.0 (/home/vietanh123/Work/dextrade/dextrade)`
versions that meet the requirements `=2.1.0` are: 2.1.0

the package `solana-program` depends on `solana-pubkey`, with features: `solana-sha256-hasher` but `solana-pubkey` 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 `solana-pubkey` which could resolve this conflict

Anyways for me to solve this problem?

发布评论

评论列表(0)

  1. 暂无评论