-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
A-diagnosticsArea: Error and warning messages generated by Cargo itself.Area: Error and warning messages generated by Cargo itself.C-bugCategory: bugCategory: bugE-easyExperience: EasyExperience: Easy
Description
Problem
I am trying to add the crate 'hidapi' to my project, but I have a dependency issue. I don't know how to resolve this.
When I execute cargo build, I get the following:
$ cargo build
Updating crates.io index
error: failed to select a version for `hidapi`.
... required by package `ledger-transport-hid v0.8.0`
... which is depended on by `ledger-transport v0.8.0`
... which is depended on by `test-ledger-rs v0.1.0 (/home/nick-test/test-ledger-rs2)`
versions that meet the requirements `^1.2.3` are: 1.2.5, 1.2.3
the package `hidapi` links to the native library `hidapi`, but it conflicts with a previous package which links to `hidapi` as well:
package `hidapi v0.5.2`
... which is depended on by `ledger v0.2.5`
... which is depended on by `test-ledger-rs v0.1.0 (/home/nick-test/test-ledger-rs2)`
When I change the hidapi versio, the error remains.
Steps
- Add the following to the Cargo.toml file:
ledger = "0.2.5"
ledger-transport-hid = "0.8.0"
ledger-apdu = "0.8.0"
ledger-transport = "0.8.0"
hidapi = "0.5.2"
-
Execute cargo build
-
Eventually, change hidapi to other versions that meet the requirements.
Notes
Output of cargo version
: cargo 1.49.0 (d00d64d 2020-12-05)
I am working on Debian 10.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Error and warning messages generated by Cargo itself.Area: Error and warning messages generated by Cargo itself.C-bugCategory: bugCategory: bugE-easyExperience: EasyExperience: Easy