使用scoop安装rustup
时间: 2024-09-06 21:03:58 浏览: 272
Scoop是一个Windows下的跨平台工具管理器,它允许用户轻松地安装各种命令行工具,包括Rustup。要使用Scoop安装Rustup,你需要先完成几个步骤:
1. **安装Scoop**:
- 访问Scoop的GitHub仓库:https://github.com/scoopinstaller/scoop
- 根据你的系统(64位或32位),下载并运行`get-scoop.ps1`脚本。
- 运行`iex (New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/scoopinstaller/scoop/main/install.ps1')`
- 确认安装并关闭 PowerShell。
2. **添加Rust主仓库**:
- 在Scoop目录(`%USERPROFILE%\scoop\apps`)下创建一个新的`rubs`文件夹(如果不存在的话)。
- 打开PowerShell,运行:
```
scoop config sources https://github.com/rust-lang/rustup.rs.git
```
3. **安装rustup**:
- 使用`scoop install rustup`命令安装 Rustup。Scoop会自动处理依赖项,并将rustup添加到系统的PATH环境变量中。
4. **初始化rustup**:
安装完成后,打开一个新的终端窗口,运行 `rustup self update` 更新rustup到最新版本,然后你可以通过`rustup`命令开始使用Rust了。
阅读全文
相关推荐

















