我正在尝试使用Cargo在我的系统(Arch Linux)上安装Rust crate.我可以搜索板条箱并找到我需要的东西,例如:
$ cargo search curl | head -n3
Updating registry `https://github.com/rust-lang/crates.io-index`
curl (0.3.0) Rust bindings to libcurl for making HTTP requests
curl-sys (0.2.0) Native bindings to the libcurl library
Run Code Online (Sandbox Code Playgroud)
当我尝试安装它时,我收到以下错误:
$ cargo install curl
Updating registry `https://github.com/rust-lang/crates.io-index`
error: specified package has no binaries
Run Code Online (Sandbox Code Playgroud)
这是什么意思?我是否必须先从源代码构建它?如果Cargo没有安装它,它有什么意义?
$ uname -a
Linux 4.6.1-2-ARCH #1 SMP PREEMPT Thu Jun 2 15:46:17 CEST 2016 x86_64 GNU/Linux
$ rustc --version
rustc 1.9.0
$ cargo --version
cargo 0.10.0 (10ddd7d 2016-04-08)
Run Code Online (Sandbox Code Playgroud)