Skip to content

error: failed to select a version for hidapi. #9294

@ndcroos

Description

@ndcroos

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

  1. 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"

  1. Execute cargo build

  2. 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

No one assigned

    Labels

    A-diagnosticsArea: Error and warning messages generated by Cargo itself.C-bugCategory: bugE-easyExperience: Easy

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions