Rust 版本升级:rustup update stable 报错

Rust 版本升级 rustup update stable 报错

一、报错内容

error: could not download file from ‘https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256’ to ‘/Users/xxx/.rustup/tmp/rv6vdfu3eupwo64m_file’: failed to make network request: error sending request for url (https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256): error trying to connect: tcp connect error: Connection refused (os error 61): error trying to connect: tcp connect error: Connection refused (os error 61): tcp connect error: Connection refused (os error 61): Connection refused (os error 61)

错误内容:
系统无法连接到 Rust 语言官方的静态文件服务器 static.rust-lang.org,导致对应的文件没有下载到指定的文件夹中

二、解决方案

1. 下载对应的文件

点击下面链接进行下载
https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256

2. 放到指定文件夹中

在报错内容中可以看到是放到你的 /Users/xxx/.rustup/tmp/ 这个文件夹中,打开文件夹,放到对应内容中即可,如下所示:

rustup

3. 重新执行 rustup update stable

终端中重新执行 rustup update stable 即可进行 rust 更新

升级版本下载比较多的内容,耐心等待即可

4. 查看新版本

4.1. cargo version

cargo 更新
cargo 更新

4.2. rustup --version

rustup 更新
rustup

4.3. rustc --version

rust 更新
rust

相关推荐

  1. 【代码问题】mmcv+mmseg版本升级

    2024-07-12 05:52:06       40 阅读
  2. 解决Rust Cargo

    2024-07-12 05:52:06       25 阅读
  3. pip升级,或者pip install pywin32

    2024-07-12 05:52:06       30 阅读
  4. 服务器升级Nacos2.2.3、rocksdb问题处理

    2024-07-12 05:52:06       26 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-12 05:52:06       67 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-12 05:52:06       72 阅读
  3. 在Django里面运行非项目文件

    2024-07-12 05:52:06       58 阅读
  4. Python语言-面向对象

    2024-07-12 05:52:06       69 阅读

热门阅读

  1. SVN 标签的使用与优势

    2024-07-12 05:52:06       25 阅读
  2. 白骑士的C++教学进阶篇 2.3 模板

    2024-07-12 05:52:06       29 阅读
  3. python常用命令

    2024-07-12 05:52:06       22 阅读
  4. 微信小程序中的数据通信

    2024-07-12 05:52:06       27 阅读
  5. TypeScript中的交叉类型

    2024-07-12 05:52:06       29 阅读