Rust-安装(1)
程序员文章站
2022-07-04 23:48:19
...
$ curl 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.
It will add the cargo, rustc, rustup and other commands to
Cargo's bin directory, located at:
/home/lxaipro/.cargo/bin
This can be modified with the CARGO_HOME environment variable.
Rustup metadata and toolchains will be installed into the Rustup
home directory, located at:
/home/lxaipro/.rustup
This can be modified with the RUSTUP_HOME environment variable.
This path will then be added to your PATH environment variable by
modifying the profile files located at:
/home/lxaipro/.profile
/home/lxaipro/.bash_profile
You can uninstall at any time with rustup self uninstall and
these changes will be reverted.
Current installation options:
default host triple: x86_64-unknown-linux-gnu
default toolchain: stable
profile: default
modify PATH variable: yes
1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
>1
info: profile set to 'default'
info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
info: latest update on 2019-11-07, rust version 1.39.0 (4560ea788 2019-11-04)
info: downloading component 'cargo'
4.7 MiB / 4.7 MiB (100 %) 1.1 MiB/s in 5s ETA: 0s
info: downloading component 'clippy'
1.8 MiB / 1.8 MiB (100 %) 1.4 MiB/s in 1s ETA: 0s
info: downloading component 'rust-docs'
11.8 MiB / 11.8 MiB (100 %) 3.8 MiB/s in 2s ETA: 0s
info: downloading component 'rust-std'
176.4 MiB / 176.4 MiB (100 %) 9.7 MiB/s in 18s ETA: 0s
info: downloading component 'rustc'
66.3 MiB / 66.3 MiB (100 %) 9.4 MiB/s in 7s ETA: 0s
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
11.8 MiB / 11.8 MiB (100 %) 3.0 MiB/s in 3s ETA: 0s
info: installing component 'rust-std'
176.4 MiB / 176.4 MiB (100 %) 13.6 MiB/s in 13s ETA: 0s
info: installing component 'rustc'
66.3 MiB / 66.3 MiB (100 %) 6.7 MiB/s in 9s ETA: 0s
info: installing component 'rustfmt'
info: default toolchain set to 'stable'
stable installed - rustc 1.39.0 (4560ea788 2019-11-04)
Rust is installed now. Great!
To get started you need Cargo's bin directory ($HOME/.cargo/bin) in your PATH
environment variable. Next time you log in this will be done
automatically.
$ source $HOME/.cargo/env
安装脚本在下次登录时自动加Rust到系统路径PATH 。
如果你想马上开始使用Rust而不是重新启动你的终端,在你的shell中运行以下命令来手动添加Rust到你的系统路径:
$ source $HOME/.cargo/env
也可加入下面行到 ~/.bash_profile:
$ export PATH="$HOME/.cargo/bin:$PATH"
打开https://www.rust-lang.org/tools/install安装
更新与卸载
$ rustup update
$ rustup self uninstall
上一篇: Elasticsearch 安装插件 IK Analyzer
下一篇: spring的事务管理配置