官方下载地址
直接下载是最好的,Linux较为复杂,需要使用官方安装脚本:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
这个脚本在国内几乎不能运行。
具体安装方式
当然修改镜像源地址啦。
以清华镜像源为例:
无脑操作方式
将以下代码复制到 Linux 终端,并运行即可
echo 'export RUSTUP_UPDATE_ROOT=https://mirrors.tuna.tsinghua.edu.cn/rustup/rustup' >> ~/.bashrc
echo 'export RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup' >> ~/.bashrc
source .bashrc
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
<完>