【发布时间】:2023-04-08 23:52:01
【问题描述】:
我在 Windows 上构建 Rust 程序时遇到问题。在我添加依赖项之前,一切都很好。添加依赖项后,我会尝试更新 crates 注册表。有任何想法吗?
cargo build --verbose
Updating registry `https://github.com/rust-lang/crates.io-index`
error Unable to update registry https://github.com/rust-lang/crates.io-index
Caused by:
[2/-1] Could not open '.cargo/registry/index/github.com-88ac128001ac3a9a/bi/tt/bittorrent' for writing: Access is denied.
【问题讨论】:
-
尝试重命名文件夹
c:\users\YORUSERNAME\.cargo\registry\index\github.com-88ac128001ac3a9a并再次运行 -
无法打开消息中的实际文件夹是 c:\users\YORUSERNAME\.cargo\registry\index\github.com-88ac128001ac3a9a。我省略了 c:\users\username。
-
我知道,但是你能把它重命名为 VIA explorer 吗? )
-
我做到了。我得到同样的错误
标签: windows rust rust-cargo