繁体   English   中英

无法在Windows 10上成功安装rust

[英]Not able to install rust successfully on Windows 10

我正在尝试安装rust,但失败并出现以下错误:在Windows 10上有人遇到过相同的问题吗? 任何帮助表示赞赏!

info: syncing channel updates for 'stable-x86_64-pc-windows-msvc'
info: latest update on 2019-02-28, rust version 1.33.0 (2aa4c46cf 2019-02-28)
info: downloading component 'rustc'
info: downloading component 'rust-std'
info: downloading component 'cargo'
info: downloading component 'rust-docs'
info: installing component 'rustc'
57.7 MiB /  57.7 MiB (100 %)   2.6 MiB/s ETA:   0 s
info: installing component 'rust-std'
51.4 MiB /  51.4 MiB (100 %)   4.9 MiB/s ETA:   0 s
info: installing component 'cargo'
  2.8 MiB /   2.8 MiB (100 %) 152.0 KiB/s ETA:   0 s
info: installing component 'rust-docs'
  8.5 MiB /   8.5 MiB (100 %) 281.6 KiB/s ETA:   0 s
info: rolling back changes
error: could not rename component file from 'C:\Users\rraut\.rustup\tmp\8va7fsfks8zkeb5b_dir\bk' to 'C:\Users\rraut\.rustup\toolchains\stable-x86_64-pc-windows-msvc\share/man'
error: could not rename component file from 'C:\Users\rraut\.rustup\tmp\mybj8dkhr27yqlzf_dir\bk' to 'C:\Users\rraut\.rustup\toolchains\stable-x86_64-pc-windows-msvc\share/man/man1'
error: could not rename component file from 'C:\Users\rraut\.rustup\tmp\5l3hc8i6tp_6rqsa_dir\bk' to 'C:\Users\rraut\.rustup\toolchains\stable-x86_64-pc-windows-msvc\bin'
error: could not rename component file from 'C:\Users\rraut\.rustup\tmp\ejk4eeibyz0dkgjt_dir\bk' to 'C:\Users\rraut\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/etc'
error: could not rename component file from 'C:\Users\rraut\.rustup\tmp\1758r_0hyzkhtohi_dir\bk' to 'C:\Users\rraut\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/x86_64-pc-windows-msvc/bin'
error: could not rename component file from 'C:\Users\rraut\.rustup\tmp\5_0tdsg3gat5u6yy_dir\bk' to 'C:\Users\rraut\.rustup\toolchains\stable-x86_64-pc-windows-msvc\lib/rustlib/x86_64-pc-windows-msvc/codegen-backends'
error: failed to install component: 'rust-docs-x86_64-pc-windows-msvc', detected conflict: '"share/doc/rust/html"'

我遇到了同样的问题。 我解决问题的方法是手动重新安装stable-x86_64-pc-windows-msvc工具链,该工具链在安装时显然已损坏。

我做了:

rustup toolchain remove stable-x86_64-pc-windows-msvc

然后:

rustup install stable-x86_64-pc-windows-msvc

一些注意事项

  • 您可以通过导航到用户文件夹并找到.rustup文件夹(例如C:Users\\MyWindowsUser\\.rustup\\toolchains )来获得工具链名称(按发布渠道划分:稳定,每晚,测试版)。
  • 这也应该修复VSCode的RLS扩展。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM