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

本文主要是介绍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)

这篇关于rustup update 升级rust时异常 directory does not exist: ‘share/doc/rust/html‘ 解决方法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/863631

相关文章

Nginx设置连接超时并进行测试的方法步骤

《Nginx设置连接超时并进行测试的方法步骤》在高并发场景下,如果客户端与服务器的连接长时间未响应,会占用大量的系统资源,影响其他正常请求的处理效率,为了解决这个问题,可以通过设置Nginx的连接... 目录设置连接超时目的操作步骤测试连接超时测试方法:总结:设置连接超时目的设置客户端与服务器之间的连接

Java判断多个时间段是否重合的方法小结

《Java判断多个时间段是否重合的方法小结》这篇文章主要为大家详细介绍了Java中判断多个时间段是否重合的方法,文中的示例代码讲解详细,感兴趣的小伙伴可以跟随小编一起学习一下... 目录判断多个时间段是否有间隔判断时间段集合是否与某时间段重合判断多个时间段是否有间隔实体类内容public class D

Python使用国内镜像加速pip安装的方法讲解

《Python使用国内镜像加速pip安装的方法讲解》在Python开发中,pip是一个非常重要的工具,用于安装和管理Python的第三方库,然而,在国内使用pip安装依赖时,往往会因为网络问题而导致速... 目录一、pip 工具简介1. 什么是 pip?2. 什么是 -i 参数?二、国内镜像源的选择三、如何

IDEA编译报错“java: 常量字符串过长”的原因及解决方法

《IDEA编译报错“java:常量字符串过长”的原因及解决方法》今天在开发过程中,由于尝试将一个文件的Base64字符串设置为常量,结果导致IDEA编译的时候出现了如下报错java:常量字符串过长,... 目录一、问题描述二、问题原因2.1 理论角度2.2 源码角度三、解决方案解决方案①:StringBui

Linux使用nload监控网络流量的方法

《Linux使用nload监控网络流量的方法》Linux中的nload命令是一个用于实时监控网络流量的工具,它提供了传入和传出流量的可视化表示,帮助用户一目了然地了解网络活动,本文给大家介绍了Linu... 目录简介安装示例用法基础用法指定网络接口限制显示特定流量类型指定刷新率设置流量速率的显示单位监控多个

Java覆盖第三方jar包中的某一个类的实现方法

《Java覆盖第三方jar包中的某一个类的实现方法》在我们日常的开发中,经常需要使用第三方的jar包,有时候我们会发现第三方的jar包中的某一个类有问题,或者我们需要定制化修改其中的逻辑,那么应该如何... 目录一、需求描述二、示例描述三、操作步骤四、验证结果五、实现原理一、需求描述需求描述如下:需要在

部署Vue项目到服务器后404错误的原因及解决方案

《部署Vue项目到服务器后404错误的原因及解决方案》文章介绍了Vue项目部署步骤以及404错误的解决方案,部署步骤包括构建项目、上传文件、配置Web服务器、重启Nginx和访问域名,404错误通常是... 目录一、vue项目部署步骤二、404错误原因及解决方案错误场景原因分析解决方案一、Vue项目部署步骤

JavaScript中的reduce方法执行过程、使用场景及进阶用法

《JavaScript中的reduce方法执行过程、使用场景及进阶用法》:本文主要介绍JavaScript中的reduce方法执行过程、使用场景及进阶用法的相关资料,reduce是JavaScri... 目录1. 什么是reduce2. reduce语法2.1 语法2.2 参数说明3. reduce执行过程

C#中读取XML文件的四种常用方法

《C#中读取XML文件的四种常用方法》Xml是Internet环境中跨平台的,依赖于内容的技术,是当前处理结构化文档信息的有力工具,下面我们就来看看C#中读取XML文件的方法都有哪些吧... 目录XML简介格式C#读取XML文件方法使用XmlDocument使用XmlTextReader/XmlTextWr

mybatis和mybatis-plus设置值为null不起作用问题及解决

《mybatis和mybatis-plus设置值为null不起作用问题及解决》Mybatis-Plus的FieldStrategy主要用于控制新增、更新和查询时对空值的处理策略,通过配置不同的策略类型... 目录MyBATis-plusFieldStrategy作用FieldStrategy类型每种策略的作