【问题标题】:Cargo registry update always fails货物登记更新总是失败
【发布时间】: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


【解决方案1】:

您的防病毒软件可能会干扰操作。尝试暂时禁用您的防病毒软件,或在您的防病毒软件配置中为有问题的文件夹添加一个例外。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-07-16
    • 1970-01-01
    • 2023-01-21
    • 2015-02-05
    • 2014-09-17
    • 1970-01-01
    相关资源
    最近更新 更多