国内安装rust

admin
2025-05-29 / 3 评论 / 397 阅读 / 正在检测是否收录...

由于国内的网络环境,rust 官方脚本无法安装。但是可以利用国内的镜像源。
1、设置环境变量

# 临时设置环境变量以替换默认更新源和分发服务器
export RUSTUP_UPDATE_ROOT=https://mirrors.aliyun.com/rustup/rustup
export RUSTUP_DIST_SERVER=https://mirrors.aliyun.com/rustup

2、使用阿里的脚本

curl --proto '=https' --tlsv1.2 -sSf https://mirrors.aliyun.com/repo/rust/rustup-init.sh | sh

3、更新cargo 配置变量 。这个暂时没搞明白,稍后补充

0

评论 (3)

取消
  1. 头像
    a0dl.cn
    Windows 10 · Google Chrome
    @

    东莞三十六式主要包括哪些a0hd.cn

    回复
  2. 头像
    a0gy.cn
    Windows 10 · Google Chrome
    @

    东莞式服务a0cc.cn

    回复
  3. 头像
    a0cz.cn
    Windows 10 · Google Chrome
    @

    东莞洗浴36式a0dl.cn

    回复