增加cargo 代理或者变更下载crate的仓库地址
添加代理
- 在cargo下创建config
vi ~/.cargo/config
- 添加代理
[http] proxy = "127.0.0.1:7891" [https] proxy = "127.0.0.1:7891"
修改下载仓库
- 添加配置到
~/.cargo/config
[source.crates-io] registry = "https://github.com/rust-lang/crates.io-index" replace-with = 'ustc' [source.ustc] registry = "git://mirrors.ustc.edu.cn/crates.io-index"
- 执行命令
cargo install tauri-cli --version "^1.0.0"