windows - 在 Windows 10 上安装 Rust 时如何修复 "detected conflict"错误?

标签 windows rust installation rustup

我正在尝试安装 Rust,但失败并出现以下错误:

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"'

以前有人在 Windows 10 上遇到过同样的问题吗?

最佳答案

我遇到了同样的问题。我解决它的方法是手动重新安装 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 扩展。

关于windows - 在 Windows 10 上安装 Rust 时如何修复 "detected conflict"错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55514868/

相关文章:

c++ - 打开转义文件时出现意外行为 :///URL in IE

Magento 模块设置/安装脚本

rust - 在Rust中使用单个增变器进行无锁数据共享

rust - 拥有多个强引用并允许可变性的正确智能指针是什么?

python - 安装 PyTorch 1.4 的问题 - "No matching distribution found for torch===1.4.0"

r - 如何安装不在 CRAN 存储库中的软件包?

windows - 在 Windows Server 2003 LocalMachine/My store 中查找公共(public)证书的物理路径

windows - 用于搜索文件名并将其复制到新 TXT 文件的批处理文件

c++ - 在 Windows 中从 C++ 应用程序调用 Thrift

rust - Rust 会去虚拟化特征对象函数调用吗?