Rust Can';t构建hidapi生锈示例
我只是试着从文档中运行这个示例 有人遇到过这个错误吗 我已经试过了 货物清洁 及 货物建造Rust Can';t构建hidapi生锈示例,rust,rust-cargo,hidapi,Rust,Rust Cargo,Hidapi,我只是试着从文档中运行这个示例 有人遇到过这个错误吗 我已经试过了 货物清洁 及 货物建造 同样,您必须在系统上安装libusb-1.0。您似乎正在使用自制软件,因此您还必须通过自制软件专门安装它,因为pkg config正在寻找它 有可能是Homebrew没有以这个确切的名称提供此库,或者是hidapi板条箱与macOS不兼容。查看hidapi板条箱了解详细信息,因为这是板条箱特有的问题。找不到libusb-1.0-安装它。或者更可能的是,安装libusb devno,它不工作。我使用ubun
同样,您必须在系统上安装libusb-1.0。您似乎正在使用自制软件,因此您还必须通过自制软件专门安装它,因为pkg config正在寻找它
有可能是Homebrew没有以这个确切的名称提供此库,或者是
hidapi
板条箱与macOS不兼容。查看hidapi
板条箱了解详细信息,因为这是板条箱特有的问题。找不到libusb-1.0-安装它。或者更可能的是,安装libusb devno,它不工作。我使用ubuntu,我应该去下载并安装。谢谢
filip@filip-pc:~/Desktop/hidTest$ cargo build
Compiling pkg-config v0.3.17
Compiling libc v0.2.71
Compiling cc v1.0.54
Compiling hidapi v1.2.2
error: failed to run custom build command for `hidapi v1.2.2`
Caused by:
process didn't exit successfully: `/home/filip/Desktop/hidTest/target/debug/build/hidapi-f1cb7b18f844a4a0/build-script-build` (exit code: 101)
--- stderr
thread 'main' panicked at 'Unable to find libusb-1.0: "`\"pkg-config\" \"--libs\" \"--cflags\" \"libusb-1.0\"` did not exit successfully: exit code: 1\n--- stderr\nPackage libusb-1.0 was not found in the pkg-config search path.\nPerhaps you should add the directory containing `libusb-1.0.pc\'\nto the PKG_CONFIG_PATH environment variable\nNo package \'libusb-1.0\' found\n"', /home/filip/.cargo/registry/src/github.com-1ecc6299db9ec823/hidapi-1.2.2/build.rs:65:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace