curl --proto '=https' --tlsv1.2 https://sh.rustup.rs -sSf | sh
info: downloading installer
Welcome to Rust!
This will download and install the official compiler for the Rust
programming language, and its package manager, Cargo.
Rustup metadata and toolchains will be installed into the Rustup
home directory, located at:
/Users/zp/.rustup
This can be modified with the RUSTUP_HOME environment variable.
The Cargo home directory is located at:
/Users/zp/.cargo
This can be modified with the CARGO_HOME environment variable.
The cargo, rustc, rustup and other commands will be added to
Cargo's bin directory, located at:
/Users/zp/.cargo/bin
This path will then be added to your PATH environment variable by
modifying the profile files located at:
/Users/zp/.profile
/Users/zp/.bash_profile
/Users/zp/.bashrc
/Users/zp/.zshenv
You can uninstall at any time with rustup self uninstall and
these changes will be reverted.
Current installation options:
default host triple: x86_64-apple-darwin
default toolchain: stable (default)
profile: default
modify PATH variable: yes
1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
选1,提示如下则安装成功
info: profile set to 'default'
info: default host triple is x86_64-apple-darwin
info: syncing channel updates for 'stable-x86_64-apple-darwin'
703.5 KiB / 703.5 KiB (100 %) 671.4 KiB/s in 1s ETA: 0s
info: latest update on 2022-06-30, rust version 1.62.0 (a8314ef7d 2022-06-27)
info: downloading component 'cargo'
4.7 MiB / 4.7 MiB (100 %) 2.8 MiB/s in 1s ETA: 0s
info: downloading component 'clippy'
info: downloading component 'rust-docs'
18.3 MiB / 18.3 MiB (100 %) 5.3 MiB/s in 4s ETA: 0s
info: downloading component 'rust-std'
24.6 MiB / 24.6 MiB (100 %) 4.0 MiB/s in 6s ETA: 0s
info: downloading component 'rustc'
52.6 MiB / 52.6 MiB (100 %) 1.5 MiB/s in 20s ETA: 0s
info: downloading component 'rustfmt'
2.4 MiB / 2.4 MiB (100 %) 1.4 MiB/s in 2s ETA: 0s
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
18.3 MiB / 18.3 MiB (100 %) 1.7 MiB/s in 21s ETA: 0s
info: installing component 'rust-std'
24.6 MiB / 24.6 MiB (100 %) 8.9 MiB/s in 2s ETA: 0s
info: installing component 'rustc'
52.6 MiB / 52.6 MiB (100 %) 10.4 MiB/s in 5s ETA: 0s
info: installing component 'rustfmt'
info: default toolchain set to 'stable-x86_64-apple-darwin'
stable-x86_64-apple-darwin installed - rustc 1.62.0 (a8314ef7d 2022-06-27)
Rust is installed now. Great!
To get started you may need to restart your current shell.
This would reload your PATH environment variable to include
Cargo's bin directory ($HOME/.cargo/bin).
To configure your current shell, run:
source "$HOME/.cargo/env"