当前位置: 首页 > news >正文

rustup update 升级rust时异常 directory does not exist: ‘share/doc/rust/html‘ 解决方法

最近把原来的老版本rust升级为最新版本, 转悠了半天给我报一个 目录不存在异常而升级失败。

异常信息:

info: rolling back changes

error: failure removing component 'rust-docs-x86_64-apple-darwin', directory does not exist: 'share/doc/rust/html'

  stable-x86_64-apple-darwin update failed - rustc 1.70.0 (90c541806 2023-05-31)

解决方法:

mac系统下rust的安装路径在 ~/.rustup/toolchains/stable-x86_64-apple-darwin ,  进入这个目录然后手动创建提示不存在的这个目录 share/doc/rust/html , 然后在重新执行 rustup update 即可

网上其他的解决方法: 重新安装rustc, 命令如下:

# 重新安装rustc
rustup component remove rustcrustup component add rustc# 重新执行rust更新
rustup update

Rust升级和验证

➜  rustup update
info: syncing channel updates for 'stable-x86_64-apple-darwin'
714.8 KiB / 714.8 KiB (100 %)  19.2 KiB/s in 50s ETA:  0s
info: latest update on 2024-03-28, rust version 1.77.1 (7cf61ebde 2024-03-27)
info: downloading component 'rustc'54.8 MiB /  54.8 MiB (100 %)  38.4 KiB/s in 31m 29s ETA:  0s     
info: downloading component 'rust-src'2.5 MiB /   2.5 MiB (100 %)  51.2 KiB/s in  1m 25s ETA:  0s
info: downloading component 'cargo'7.0 MiB /   7.0 MiB (100 %)  22.4 KiB/s in  9m 47s ETA:  0s     
info: downloading component 'clippy'2.2 MiB /   2.2 MiB (100 %)  57.6 KiB/s in  1m 38s ETA:  0s
info: downloading component 'rust-docs'14.9 MiB /  14.9 MiB (100 %)  20.2 KiB/s in 16m 40s ETA:  0s    
info: downloading component 'rust-std'23.6 MiB /  23.6 MiB (100 %)  25.6 KiB/s in 35m 32s ETA:  0s    
info: downloading component 'rustfmt'1.8 MiB /   1.8 MiB (100 %)  16.0 KiB/s in  3m 13s ETA:  0s    
info: removing previous version of component 'rustc'
info: removing previous version of component 'rust-src'
info: removing previous version of component 'cargo'
info: removing previous version of component 'clippy'
info: removing previous version of component 'rust-docs'
info: removing previous version of component 'rust-std'
info: removing previous version of component 'rustfmt'
info: installing component 'rustc'54.8 MiB /  54.8 MiB (100 %)  10.2 MiB/s in  6s ETA:  0s
info: installing component 'rust-src'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'14.9 MiB /  14.9 MiB (100 %)   3.0 MiB/s in  4s ETA:  0s
info: installing component 'rust-std'23.6 MiB /  23.6 MiB (100 %)  10.0 MiB/s in  2s ETA:  0s
info: installing component 'rustfmt'stable-x86_64-apple-darwin updated - rustc 1.77.1 (7cf61ebde 2024-03-27) (from rustc 1.70.0 (90c541806 2023-05-31))info: cleaning up downloads & tmp directories
info: self-update is disabled for this build of rustup
info: any updates to rustup will need to be fetched with your system package manager
➜  rustup show
Default host: x86_64-apple-darwin
rustup home:  ~/.rustupstable-x86_64-apple-darwin (default)
rustc 1.77.1 (7cf61ebde 2024-03-27)

http://www.lryc.cn/news/328758.html

相关文章:

  • 算法学习——LeetCode力扣动态规划篇5
  • C语言-文件
  • 牛客NC30 缺失的第一个正整数【simple map Java,Go,PHP】
  • Unity 基于Rigidbody2D模块的角色移动
  • Stata 15 for Mac:数据统计分析新标杆,让研究更高效!
  • vue配置代理proxy
  • .NET DES加密算法实现
  • 构建操作可靠的数据流系统
  • awesome-cheatsheets:超级速查表 - 编程语言、框架和开发工具的速查表
  • GFW不起作用
  • AndroidStudio出现类似 Could not create task ‘:app:ToolOperatorDemo.main()‘. 错误
  • 一些常见的ClickHouse问题和答案
  • 第九届蓝桥杯大赛个人赛省赛(软件类)真题C 语言 A 组-分数
  • 并发编程——4.线程池
  • 阿里云魔搭发起“ModelScope-Sora开源计划”,将为中国类Sora模型开发提供一站式工具链
  • 大模型与数据分析:探索Text-to-SQL
  • Unity VisionOS开发流程
  • 聊聊k8s服务发现的优缺点
  • Tomcat是如何处理并发请求的?
  • H12-831_561
  • Java23种常见设计模式汇总
  • 神经网络与深度学习(一)
  • 算法学习——LeetCode力扣图论篇2
  • 大数据设计为何要分层,行业常规设计会有几层数据
  • css3之2D转换transform
  • pytest中文使用文档----6临时目录和文件
  • 从0开始搭建基于VUE的前端项目
  • elementUI this.$msgbox msgBox自定义 样式自定义 富文本
  • Lua与Python区别
  • Python学习(二)