操作系统:Ubuntu
rustup update
--> 成功rutstup target install thumbv7m-none-eabi
--> 成功cargo install cargo-flash
error: failed to run custom build command for `hidapi v1.4.2`
process didn't exit successfully: `/tmp/cargo-installgobLzf/release/build/hidapi-aad2646622c847a4/build-script-build` (exit status: 101)
error: could not find system library 'libudev' required by the 'hidapi' crate
error: failed to compile `cargo-flash v0.13.0`, intermediate artifacts can be found at `/tmp/cargo-installgobLzf`
首先安装依赖项,然后安装cargo-flash:
sudo apt install -y pkg-config libusb-1.0-0-dev libftdi1-dev
sudo apt-get install libudev-dev
然后再次重试原来的命令:
cargo install cargo-flash
详情请访问cargo-flash crate。