rust问题记录
小于 1 分钟
Rust问题记录
crate版本问题
如果在安装依赖的时候出现:
error: package `xxx` cannot be built because it requires rustc 1.81.0 or newer, while the currently active rustc version is 1.77.1
Either upgrade to rustc 1.81.0 or newer, or use
cargo update parse-size@1.1.0 --precise ver
where `ver` is the latest version of `parse-size` supporting rustc 1.77.1
这表明了你的rustc版本过低,解决方案1是升级rust版本,第二是运行:
cargo update xxx --precise 1.0.0
xxx是你的依赖名称,1.0.0是兼容你当前使用的rust版本的依赖版本 兼容依赖版本可以在:rust crate这里查看