首页 > 其他分享 >How to work around rustup-init failure

How to work around rustup-init failure

时间:2023-06-15 16:35:56浏览次数:36  
标签:info ... around rustup rustc work component failure init


How to work around rustup-init failure

(Jin Qing’s Column, Mar., 2022)

rustup-init.exe may fail if some anti-virus software is running with realtime protection.

The error message is like this after many retries:

error: could not rename component file from 'C:\.../rust/html' to 'C:\.../rust/html'

See: https://github.com/rust-lang/rustup/issues/1912

And it is not possible to stop the anti-virus for a corporate laptop.

There is a way to workaround this. Here are the steps:

  1. Run rustup-init until it begins to retry renaming
  2. Kill rustup-init when it is retrying
  • rustup will be installed before the failure
  • do not let rustup-init do the cleanup after the final failure
  1. Run rustup update to install all.
  2. Run rustup-init again to setup others.

rustup update will report that rustc was not found:

C:\Users\jinqing01>rustup update
info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
...
info: removing previous version of component 'rustc'
warning: during uninstall component rustc was not found
...
info: installing component 'rustc'
...  
info: checking for self-updates

  stable-x86_64-pc-windows-msvc updated - rustc 1.59.0 (9d1b2106e 2022-02-23) (from (rustc does not exist))

info: cleaning up downloads & tmp directories

Rerun rustup-init to setup the toolchain:

C:\Users\jinqing01>cargo --version
error: no override and no default toolchain set

C:\Users\jinqing01>d:
D:\>cd tool
D:\Tool>rustup-init.exe

Welcome to Rust!

This will download and install the official compiler for the Rust
programming language, and its package manager, Cargo.

...
Rust is installed now. Great!

Press the Enter key to continue.

D:\Tool>cargo --version
cargo 1.59.0 (49d8809dc 2022-02-10)


标签:info,...,around,rustup,rustc,work,component,failure,init
From: https://blog.51cto.com/u_16162321/6493185

相关文章

  • springboot项目启动失败之 org.springframework.boot.env.OriginTrackedYamlLoader.cr
    1、检查一下父项目的module的依赖是否,以及版本是否一致。例如<dependency><groupId>org.yaml</groupId><artifactId>snakeyaml</artifactId><version>1.30</version></dependency>2、如何知道自己的org.yaml的版本,可以双击Shift键,输入如图所示,注意划红线的地方就是......
  • Mongodb - org.springframework.dao.DuplicateKeyException
    首先明确场景为mongodb,此异常在进行mongodb的插入操作时抛出,插入的主键已经存在。衍生场景,使用upsert时抛出,此处的包括了$set和$setOnInsert由于upsert非原子操作,如果在多线程环境下:线程A和线程B同时对数据库未存在的记录record1进行upsert,有可能会出现两个线程都判断为应该进行......
  • XSSFWorkbook读取合并单元格中的数据
    @ServicepublicclassAppInfoUploadServiceImplimplementsAppInfoUploadService{@AutowiredprivateAppInfoMapperappInfoMapper;@AutowiredprivateCommonMappercommonMapper;@OverridepublicvoiduploadAppInfo(MultipartFilefile)......
  • Does the Porsche Cayenne S 2008 work with Porsche PIWIS 3
    Question:IhavePorschecayenneS20084.8ltsgasolineautomatictransmision.VINnumberWP1ZZZ9PZ8LA41178,Caniprogrammingheadlightcontrolmoduleandpneumaticsuspensionlevelwiththistool?Answer:YES,youcan.Werecommendyoucancheckour......
  • 论文解读- nnU-Net: Self-adapting Framework for U-Net-Based Medical Image Segment
    本篇主要解读论文“nnU-Net:Self-adaptingFrameworkforU-Net-BasedMedicalImageSegmentation”==nnU-Net:基于U-Net的自适应医学图像分割框架。实现见本专栏下其他博文。直达链接......
  • Network File System 网络文件系统(centos 6)
    预备知识:1 什么是程序、进程、线程?程序:安装的软件就是程序进程:运行的程序---就是进程线程:运行的程序同时完成多个任务2 NFS三个主要组件?Rpc.nfsd  :它是基本的NFS守护进程,主要功能是管理客户端是否能够登录服务器;(由nfs进程实现)Rpc.mount:主要功能是管理NFS......
  • 在上一操作期间遇到问题:Debug|AnyCPU 配置中 TargetFrameworkMoniker和NugetTargetMon
    在上一操作期间遇到问题:Debug|AnyCPU配置中TargetFrameworkMoniker和NugetTargetMoniker属性的值均为空场景使用VS打开之前的项目,报错:在上一操作期间遇到问题:Debug|AnyCPU配置中TargetFrameworkMoniker和NugetTargetMoniker属性的值均为空新建项目后,选择该项目未项......
  • Docker network —— why network
      course:ManagingDockerNetworking|Pluralsight ManagingDockerNetworkingby NigelPoultonThiscoursewillteachyouhowtobuildandmanagecontainernetworks,andhowtoconfigureandmanageservicediscovery.     1.微服务=》网......
  • 关于Qt **QNetworkAccessManager**、**QNetworkReply**、**QNetworkRequest**实现ftp
    实现的ftp下载需要反馈下载进度,但是代码得到的bytesTotal始终为-1,直到下载完成那一刻,才变成文件大小。于是分析qt5base的network部分代码:network/access/qnetworkaccessftpbackend.cpp文件中,有如下片段:voidQNetworkAccessFtpBackend::ftpRawCommandReply(intcode,constQStr......
  • CF 932 E. Team Work 第二类斯特林数总结
    求解\(\sum_{x=1}^nC(n,x)x^k,n\le10^9,k\le5000\)第二类斯特林数n个不同的小球放入k个相同的盒子的方案数\(S(n,k)\),盒子非空显然有\(S(n,k)=S(n-1,k-1)+k\cdotS(n-1,k)\)注意边界\(S(n,0)=[n==0],S(n,1)=1\)考虑到\(x^k\)可以利用第二类斯特林数化简\(x^k=\sum_{i=1}^{x......